Tuesday, 27 August 2013

Cannot link image to url ( tag inside of tag not working for slideshow)

Cannot link image to url ( tag inside of tag not working for slideshow)

I have a slideshow and I want to link each slide to some url, which should
be easy, but it's not working.
I'm using the slider from here: http://dev7studios.com/lean-slider/ If you
don't want to download the code, I guess you can just use inspect element
and edit it to test it yourself.
...
<div class="slide1 lean-slider-slide">
<a href="http://www.google.com"><img
src="images/1.jpg" alt="" /></a>
</div>
...
I also tried using onclick with javascript with no luck.
<script>
function test(){
document.location.href = 'http://www.google.com';
}
</script>
<img src="images/1.jpg" alt="" onclick="test()" />

No comments:

Post a Comment