Master Sliders swipe and href

604 Views Asked by At

I have this code for sliders.

<div class="ms-slide slide-<?=$i++;?>" data-fill-mode="fill" data-delay="5" >
<img href="<?=$sliders->slide_resim;?>" src="<?=$siteurl;?>/img/blank.gif" data-src="<?=$siteurl;?>/uploads/sliders/<?=$sliders->slide_resim;?>" alt="Hilbet110.com">
</div>

when i put href before img tag sliders not working. when i put onclick in img inside its open page on swipe. what can i do for this? if swipe dont work link if only click go to link. can anyone help me please?

1

There are 1 best solutions below

0
On

Old subject without answer so here is mine.

The href attribute does nos exist for img tag. If you want to add a link on an image, try one of these :

  • add an <a> tag around it, with your href attribute
  • use Javascript as explained here
  • use jQuery to create a callback $('#your_id").click(function () { window.location = 'www.google.com'; });

That's all folks !