Search code examples
jqueryx-editable

on.('save') event using x-editable


I'm using following code to detect when values are saved.

$('.qty').on('save', function() { // .qty can be also .id or .price etc
    ...
}

Do I need to set this for every field or can I just use some global event?


Solution

  • $('.qty') will match all elements with the qty class. So what you have will add your event listener to all of those matched elements.