Here is my function, this works:
my.SetTablepagerIndex = function() {
var blah = $("#currentPage").text();
var test = blah.indexOf("o");
var pagerIndex = $.trim(blah.substring(4, test));
return pagerIndex;
}
then, i’m assigning that to a var. why doesnt this work? I just get a ‘NaN’
var index = Util.SetTablepagerIndex();
I don’t want to declare a global variable, so if what i’m doing is a bad thing what’s a better way to pass this value?
the actual issue is that my functions are being called out of order. setTablepagerIndex is being called before the table for the pager has been created…