I want to store the current page number in a jquery variable, but I am not sure if it is possible, so I am storing it in an input field. Am I doing it the most efficient way?
<input type='hidden' id='current_page' />
$('#current_page').val(0);
if page is changed,
function (newpage){
$('#current_page').val(page_num);
}