live event not works in ie7?

2019-06-13 18:05发布

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条回答
Viruses.
2楼-- · 2019-06-13 19:04

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

查看更多
登录 后发表回答