jQuery $(document).ready and UpdatePanels?

后端 未结 19 1508
庸人自扰
庸人自扰 2020-11-22 01:32

I\'m using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready . For example:

19条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 01:47

    This worked for me:

    $(document).ready(function() {
    
        // Do something exciting
    
        var prm = Sys.WebForms.PageRequestManager.getInstance();
    
        prm.add_endRequest(function() {
            // re-bind your jQuery events here
        });
    
    });
    

提交回复
热议问题