jQuery $(document).ready and UpdatePanels?

后端 未结 19 1738
庸人自扰
庸人自扰 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:41

    FWIW, I experienced a similar issue w/mootools. Re-attaching my events was the correct move, but needed to be done at the end of the request..eg

    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_endRequest(function() {... 
    

    Just something to keep in mind if beginRequest causes you to get null reference JS exceptions.

    Cheers

提交回复
热议问题