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

  1. the subject listings loaded popup on click lists modules
  2. 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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -