I have this simple select:
<select name="zlecenia_index_icpp" id="items_per_page">
<option value="10">10</option>
<option value="25" selected="selected">25</option>
<option value="50">50</option>
</select>
and on it there's:
$('#items_per_page').change(function(){
var controller_action = this.name.replace(/_/g, '/');
location.href = config.base_url + '/' + controller_action + '/'+this.value;
});
It used to work in jQuery 1.3, but in 1.4 the change event is fired as soon as I click on the select box. Is there any solution besides going back to 1.3?
This really seems to be a bug and it has been reported to jQuery:
http://dev.jquery.com/ticket/5869
There has been a patch applied and will be part of jQuery 1.4.1.
http://github.com/jquery/jquery/commit/435772e29b4ac4ccfdefbc4045d43f714e153381
Here's fix for this bug: http://github.com/mcurry/jquery/commit/a293f5938eb9efd41158b948f487672d43b7c820
Hopefully it'll get into 1.4.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With