I have elements on different jquery mobile pages, I use scripts that dynamically modify those elements values, the problem is those scripts are automated and I get exception e.g.:
Uncaught Error: cannot call methods on slider prior to initialization;
attempted to call method 'refresh'
when I use something like this:
$('#tsetpoint').val(value).slider('refresh');
I think this happens because '#tsetpoint' element is being modified when the page it is on is not showed, to explain scenario: lets say I have 2 pages, "main" and "not-main". '#tsetpoint' element resides inside "not-main" page.
If I load my app with "not-main" page as default "myapp.html#not-main", the '#tsetpoint' element get's initialized and everything work's fine.
But if I start up with "myapp.html#main", there's no element '#tsetpoint' initialized and so I get the error.
So the question is how to initialize all elements on all pages, of jquery mobile, or how to check whether the element was initialized?