Current page from url
var $url = $(location).attr('href'); var str = $url; var tmp = str.split("/"); var page = +tmp.pop() + 1; $('#pageNo').html("Current Page: <strong>" + page + "<strong>");