ASP.NET Ajax partial postback and jQuery problem

后端 未结 1 1178
春和景丽
春和景丽 2021-01-15 19:13

A control contains some HTML and some jQuery to handle a fancy tooltip to display when you click an image within a div.

The control is then used on several different

相关标签:
1条回答
  • 2021-01-15 19:39

    Just call it once the page loads as well, you can do that by adding this at the end:

    $(EndRequestHandler);
    

    This will cause that code to run both when an UpdatePanel refreshes, and when the page first loads. When you pass in a function to the jQuery constructor, you're calling the jQuery(callback) version, if it's easier to think about, you're doing the short version of this:

    $(document).ready(EndRequestHandler); //or..
    $(document).ready(function() { EndRequestHandler(); });
    
    0 讨论(0)
提交回复
热议问题