I am using one plugin that one is http://www.menucool.com/slider/thumbnail-slider-demo-2. But i want to implement clickable image.
In this plugin show image by anchor tag like this:
<div style="padding:120px 0;">
<div id="thumbnail-slider">
<div class="inner">
<ul>
<li>
<a class="thumb" href="img/6.jpg"></a>
</li>
<li>
<a class="thumb" href="img/7.jpg"></a>
</li>
</ul>
</div>
</div>
</div>
I want to redirect page after click on this image. Give me some idea about this. It is possible to Make anchor tag with image clickable with this plugin?
Give me some idea.
Thanks
Instead of using
you can use
In anchor tag, you can also change the href attribute if you want to redirect it to any url, like this:
This is simple and straight forward answer
If I understand you correctly, you just need to listen to the
click
event, then do whatever you want.In the below demo, if you click on the front slide it will redirect to google. If not, it will do nothing. If you want to redirect when
click
on any image, just remove theif
statement that check that the image in the front:Note: It will not do the redirect because of security reason so you can see it in this bin.
http://jsbin.com/vikejo/2/edit?html,js,output
Edit To redirect to a different URL for each image, you can add a
data-
attribute, in this casedata-href
, then, when user clicks on the image he redirect to the URL which is the value of the attribute.The link
In the click event
use this
source :- http://www.menucool.com/jquery-slider
Use image tag inside a tag to display image as hyperlink