live event not works in ie7?

落爺英雄遲暮 提交于 2019-12-23 05:26:07

问题


I am displaying checkbox via ajax and i had triggered event when clicking that check box. It wrks in all browser but in ie7 it not works. i clicked on check box nothing happened. my sample code.

$("#checkbox_id").live('change',function(){
    alert('check');
});

回答1:


IE7 Wont supports change event in live (i.e $(#checkbox_id).live('change', function(){}))

Remember once html code displayed in ajax particularly for checkbox live change event wont works in ie7. Use $('#checkbox_id').live('click',function(){}); for ajax checkbox event triggering.

My answer might help some one who face same problem



来源:https://stackoverflow.com/questions/4476634/live-event-not-works-in-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!