mercredi 1 mars 2017

Get a message if checkbox selected only for the first time

I want to execute a function if a checkbox is selected only for the first time. Is it possible?

By using:

this.on('buuttonCheckBox:set', function(){
  //do the work
 })

or

this.on('buuttonCheckBox:change', function(){
  //do the work
 })

or with Jquery:

  $('#checkbox1').click(function() {
    if (!$(this).is(':checked')) {
        return confirm("Are you sure?");
    }
});




Aucun commentaire:

Enregistrer un commentaire