javascript - Pageinit and Ready Events Irregularities -
here link fiddle of issue facing with pageinit , ready events
with fiddle link works using onload , ondomready. "everything" meaning
- the subject listings loaded popup on click lists modules
- the module list gives alert on click
but in code trying bind events respective ids after pageinit not working
$('#home').on('pageinit', function() { $('#modules').on('vclick','li', function(e){ e.stopimmediatepropagation(); e.preventdefault(); var module = $(this).attr("category"); moduleclick(module); }); });
listening $(document).ready( function() {)} not popup modules.
try
$(window).load(function() { ... });
or
document.addeventlistener('deviceready', ondeviceready, true); function ondeviceready(){ ... }
Comments
Post a Comment