This is my first post. I just added a checkbox into my html code, and I was wondering how to set a oncheckchange listener.
I have tried
$("#CHECKBOX").change(function(){
});
but this doesn’t seem to be working
This is my first post. I just added a checkbox into my html code, and I was wondering how to set a oncheckchange listener.
I have tried
$("#CHECKBOX").change(function(){
});
but this doesn’t seem to be working
Are you using Angular or just the Ionic CSS? If using Angular, you do not want to be doing the jQuery $(…) stuff.
You should be using ng-change
like :
<checkbox ng-change="tellMeItChanged()" ng-model="user.agreed">Agree?</checkbox>
Thank you all for your answers. I now use angular to check for changes and it is working.
Thanks, I now user angular to check for changes and it works.