Asp label changed event in jQuery

How to call jquerymethod when changing asp label value? I tried this, but it does not work.

$("#lbladdsupplier").change(function () { alert('Changed'); }); 
+4
source share
1 answer

The change event is fired only when the value of a form element changes.

In this case, I suggest triggering a custom event when the label is updated with text.

Example:

 $("#lbladdsupplier").html('new-label').trigger('labelchanged') $("#lbladdsupplier").on('labelchanged', function(){ alert.log('changed') }) 
+4
source

Source: https://habr.com/ru/post/1488227/


All Articles