html:
<input class="spinner1 ui-spinner-input" id="q1" name="value" value="1" min="1" aria-valuemin="1" aria-valuenow="5" autocomplete="off" role="spinbutton">
how to add an event on changing value of aria-valuenow
?
html:
<input class="spinner1 ui-spinner-input" id="q1" name="value" value="1" min="1" aria-valuemin="1" aria-valuenow="5" autocomplete="off" role="spinbutton">
how to add an event on changing value of aria-valuenow
?
There is no Native way that is supported by all browsers to do this, you can check a look on Mutation_Events but it is not fully functional.
You can though, trigger a custom event on the item that is changing you custom attribute, and listen to this event to make needed changes :
$(document).on('custom-attribute-changes', function() {
// listen to the data change and do what you need
});
$('#button').click(function() {
// trigger this event on any certain change that shall edit its value
$(document).trigger('custom-attribute-changes');
});