jNice styled forms fix for select change event
I’m working so can’t be bothered writing out in full, but in case anyone else spends hours trying to work out why their fancy looking jQuery select boxes don’t seem to have a change event, add this line near the end of the selectUpdate function, just before return false;
$select.trigger(“change”);
No related posts.
a THANKS like THAT! :) for you post
I’ll try it… spend a lot of time searching how to fix this.
Thanks friend
… and of course it works ! Thanks
Thank You!!! It work :)
hi,
i have pasted that line before returen false but the style is gone please help me in this
Most ridiculous is that they have part of code which should fire it /* Fire the onchange event */
if ($select[0].selectedIndex != $(this).attr(‘index’) && $select[0].onchange) { $select[0].selectedIndex = $(this).attr(‘index’); $select[0].onchange(); }
Good, but this fires even when the select doesn’t change on every click. Replacing the code mentioned by umpirsky with prevents the default from firing the change event and only fires when the value actually changes. Thanks for the pointer!
if($select[0].selectedIndex != $(this).attr(‘index’)){
$select.trigger(‘change’);
}
Good, but this fires even when the select doesn\’t change on every click. Replacing the code mentioned by umpirsky with prevents the default from firing the change event and only fires when the value actually changes. Thanks for the pointer!
if($select[0].selectedIndex != $(this).attr(\’index\’)){
$select.trigger(\’change\’);
}