Skip to content Skip to sidebar Skip to footer

Jquery (mobile) Not Triggering .change Event On Phonegap App

(because 2 days I had no issues with this...) I have a multipage layout, in one of my pages I have a structure like so:

Solution 1:

Change your code from:

$("#auto_renew").change(function(){
    alert("Changed!");
});

To:

$(document).on('change','#auto_renew',function(){ 
    alert("Changed!"); 
});

When you bind an event like this it will act as an event delegation. Basically object don't need to exist in a DOM when you execute this binding.

Post a Comment for "Jquery (mobile) Not Triggering .change Event On Phonegap App"