Monday, June 3, 2024
177
rated 0 times [  179] [ 2]  / answers: 1 / hits: 69380  / 15 Years ago, mon, july 20, 2009, 12:00:00

I'm using a jQuery tip plugin to show help tips when the user hovers certain elements of the page.



I need to register the plugin events after the page is loaded using css selectors.



The problem is I'm using an ASP.NET Update Panel and after the first postback, the tips stop working because the update panel replaces the page content but doesn't rebind the javascript events.



I need a way to execute a javascript callback after the Update Panel refreshes its content, so I can rebind the javascript events to have the tips working again.



Is there any way to do this?


More From » asp.net-ajax

 Answers
4

Instead of putting your jQuery code inside of $(document).ready(), put it inside



function pageLoad(sender, args) { 
...
}


pageLoad is executed after every postback, synchronous or asynchronous. pageLoad is a reserved function name in ASP.NET AJAX that is for this purpose. $(document).ready() on the other hand, is executed only once, when the DOM is initially ready/loaded.



See this Overview of ASP.NET AJAX client lifecycle events


[#99094] Wednesday, July 15, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tye

Total Points: 415
Total Questions: 103
Total Answers: 116

Location: Iraq
Member since Fri, Jun 5, 2020
4 Years ago
;