If this has been answered already, please do point me in the right direction, but I’m trying to update the number at the end of an HREF of a link everytime it’s clicked.
So, my link, for example is <a class="next" href="#slideshow-wrapper0">Next</a> and everytime it’s clicked, I want it to update the ‘0’ to ‘1’ and then ‘2’ and so on.
Any ideas? This is what I came up with…
$(document).ready(function(){
var count = 0;
$("next").click(function(){
$(".work-main-content").append("<div id='portfolio-slideshow'" + (count++) +">");
});
})
Cheers,
R
Try this:
Update:
http://jsfiddle.net/rV663/