drupal - jQuery how to properly use onChange -


i using drupal 7 (quite new both drupal , javascript / jquery) , got class called "field-name-field-activity", want put onchange of every input in class.

jquery('.field-name-field-activity :input').onchange = function() {     //enter code here }; 

i not sure if i'm using onchange right here, saw people using onchange instead of onchange, not sure difference is, can tell me how use onchange right way in example?

this simple error of syntax try jquery('.field-name-field-activity :input').change(function() { //enter code here });

here link api reference http://api.jquery.com/change/


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -