我有这个简单的选择:
<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>
上面有:
$('#items_per_page').change(function(){
var controller_action = this.name.replace(/_/g, '/');
location.href = config.base_url + '/' + controller_action + '/'+this.value;
});
它曾经在 jQuery 1.3 中工作,但在 1.4 中,只要我单击选择框,就会触发更改事件。除了退回1.3还有什么解决办法吗?
这似乎确实是一个错误,已报告给 jQuery:
http://dev.jquery.com/ticket/5869 http://dev.jquery.com/ticket/5869
已应用补丁并将成为 jQuery 1.4.1 的一部分。
http://github.com/jquery/jquery/commit/435772e29b4ac4ccfdefbc4045d43f714e153381 http://github.com/jquery/jquery/commit/435772e29b4ac4ccfdefbc4045d43f714e153381
以下是针对此错误的修复:http://github.com/mcurry/jquery/commit/a293f5938eb9efd41158b948f487672d43b7c820 http://github.com/mcurry/jquery/commit/a293f5938eb9efd41158b948f487672d43b7c820
希望能进入1.4.1
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)