Hi folks,
I am trying to make a clickable banner using the following code:
HTML
- <div class="fadein">
- <a href="/link1"><img src="/images1.jpg" /></a>
- <a href="/link2"><img src="/images2.jpg" /></a>
- <a href="/link3"><img src="/images3.jpg" /></a>
- </div>
jQuery
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript">
- $(function() {
- $('.fadein img:gt(0)').hide();
-
- setInterval(function () {
- $('.fadein :first-child').fadeOut(0)
- .next('img')
- .fadeIn(0)
- .end()
- .appendTo('.fadein');
- }, 7000);
- });
- </script>
If I remove the anchor tags the banner works perfectly, how can I make this banner work with the anchor tags?
Thanks in advance for any assistance!