javascript - why pageshow not call in jquery mobile? -
can please tell me why pageshow event not call in jquery mobile? http://jsfiddle.net/g7ave/
$(document).ready(function(){ $("#1").on('pagebeforeshow ', function() { //yourfunctioncall(); alert('1') }); }); jquery( "#1" ).on( "pageshow", function( event ) { alert('1') } )
refrain using .ready()
in jquery mobile, use pageinit
instead. moreover, page id, don't use plain digits; id
should contain characters.
$(document).on("pageinit", "#pageid", function () { $("#pageid").on('pagebeforeshow ', function () { /* run code */ }); });
Comments
Post a Comment