Assuming you are correct and your id is a proper number (without any other text), you should parse the id and then add one to it:
var currentPage = parseInt($(this).attr('id'), 10);
++currentPage;
doSomething(currentPage);
Assuming you are correct and your id is a proper number (without any other text), you should parse the id and then add one to it:
var currentPage = parseInt($(this).attr('id'), 10);
++currentPage;
doSomething(currentPage);