ASP.NET Ajax partial postback and jQuery problem
        Posted  
        
            by chromaloop
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by chromaloop
        
        
        
        Published on 2010-04-22T14:14:33Z
        Indexed on 
            2010/04/26
            10:53 UTC
        
        
        Read the original article
        Hit count: 321
        
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 pages, sometimes within an updatePanel, sometimes not.
I have the following code to handle loading the jQuery after a partial postback when the control is displayed within an update panel.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
   function EndRequestHandler(sender, args) {
      $('img.ormdShipping').each(function(){
            $(this).qtip({
        // some qtip options go here
        })
      });
   }
Problem is, the jQuery doesn't load when the control is used anywhere other than an updatePanel. Do I need a second function that's triggered outside of the EndRequestHandler?
© Stack Overflow or respective owner