Response title
This is preview!
I'm using the jQuery Superslides plugin here: http://dougalpaterson.com.s69396.gridserver.com And I want to redirect the user to the main website on the 4th click of the .next arrow (after the last slide), rather than looping through the slideshow again.
I've managed to add the address to the href using this js:
$('#slides').superslides({ animation: 'fade' }); var clicked=0; $('a.next').on('click', function (e) { clicked++; if (clicked >= 3) { clicked = 0; $("a.next").attr("href", "http://www.google.com/"); } else { e.preventDefault(); } });
But when I click on the arrow, it doesn't send the user to the URL. I think this may be because of the:
e.preventDefault();
In the original plugin.
How can I remove the preventDefault, so that I send the user to my desired URL?
Thanks in advance!!
© 2013 jQuery Foundation
Sponsored by and others.