开发者

jQuery UI tabs and jQuery functions on a page

When page containing jquery-ui-tabs at the top loads for the first time, jquery elements bellow the tabs do work (e.g. for deleting or editing开发者_运维知识库 table rows on the page).. but when another tab gets clicked and the previous tab gets clicked again, the jquery functions on the page (the ones for deleting or editing) don't work anymore.

?


look at using jquery live for your events. http://api.jquery.com/live/

$('#deleteButton').live('click', function(){
    //do delete
});

$('#editButton').live('click', function(){
    //do edit
});

this ensures the events stay registered for all current and future instances.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜