javascript - jQuery on change of any form fields value but ignoring display toggles -


i'm re-building large form containing both input fields , dropdown menus submit via ajax once field has been de-focosued , if value has been changed. have jquery selector listening changes form below.

$('.settings :input').change(function(field){ 

i have working fine , fires off ajax request when needed part of form toggles section of form's visibility.

the snippet above detecting show/hide of sub-fields being changed change , fires off separate ajax calls each field.

is there alternative change can use fire if event of input's value or method detect if event value change?

the visibility of form fields toggling @ parent level show/hiding wrapper each "row". logging each event console displayed 2 events differently. initial event changing dropdown triggers toggle sends legitimate change event.

the shown/hidden fields submitting triggered event instead. managed filter out legitimate requests adding if statement ignore triggered events.

$('.settings :input').change(function(field){     if(field.istrigger != true){         .. process ajax 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -