Amit Sarwara Amit Sarwara - 5 months ago 7
jQuery Question

Fire Jquery event when i change one of the 10 select lists

I have

n
number of select lists.
n
is dynamic ( depends on the condition and range of n is 1-30). I want to run a jQuery function with
.change()
event. Please tell me how can I do that.

Answer

assign same class to all your select lists, say "demo", and use on change event handler:'

$(document).on('change', '.demo', function() {
    //your code here
});