69
rated 0 times
[
75]
[
6]
/ answers: 1 / hits: 46994
/ 12 Years ago, mon, july 2, 2012, 12:00:00
I have the following variable:
pageID = 7
I'd like to increment this number on a link:
$('#arrowRight').attr('href', 'page.html?='+pageID);
So this outputs 7, I'd like to append the link to say 8. But if I add +1:
$('#arrowRight').attr('href', 'page.html?='+pageID+1);
I get the following output: 1.html?=71 instead of 8.
How can I increment this number to be pageID+1?
More From » jquery