I’ve currently got multiple select’s on a page that are added dynamically with ajax calls using jquery.
The problem I’ve had is I could not get the change event to work on the added select unless I use the onchange inside the tag e.g.
<select id='Size' size='1' onchange='onChange(this);'>
This works, but I’m wondering if there’s a way to get it to be assigned by jquery. I’ve tried using $('select').change(onChange($(this)); in the usual place of $(document).ready but that didn’t work.
I’ve tried adding the event with bind after the ajax call but that did not work either.
Any better way to assign the event?
I had a similar problem and found this solution here:
So after you add the select’s you’ll have to repeat the change() call.