I don't know.. I'd check on jQuery Mobile docs/forum whether it's possible.
I don't know.. I'd check on jQuery Mobile docs/forum whether it's possible.
Kevin.
Try This..
code
$("[dsid='mobilenavbaritem2']").addClass('ui-disabled');//Disable
/code
This will disable nav bar item(button) 2.
If u renamed navbar buttons. Use your name in place of mobilenavbaritem2
This works on almost any button on the screen. Header, footer, navbar, no matter...
All the codes to disable the buttons work perfectly when i remove the "if statement" for checking the sessiontoken stored in the local storage.
So I'm guessing the problem is with checking if the sessiontoken variable is empty.
var session = localStorage.getItem('sessionToken');
Show the value with alert (session);
This will tell u if there is a value.
If localstorage was never set sessionToken it will be null value. And ur If statment will fail..
R u using chrome? Use deleloper tools to show localstorage etc.
Thanks Neil got it working there was some syntax error on my code.