asp.net ajax - jQuery Events on Elements in an UpdatePanel -


I have an element inside an update panel that can be displayed or displayed based on different conditions.

  & lt; Asp: UpdatePanel id = "MyUpdatePanel" runat = "server" & gt; & Lt; ContentTemplate & gt; & Lt; Asp: panel id = "mypanel" runat = "server" & gt; & Lt; Img id = "clickable image" src = "/ path / to / image.png" alt = "clickable image" /> & Lt; Span id = "specialMessage" & gt; You clicked on the image! & Lt; / Span & gt; & Lt; ASP: Cell & gt; & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt;  

I'm trying to wire it so that a special message span can be shown when clickable image IM is clicked on:

  $ (Document) $ ("# clickableImage") click (function () {$ ("# special message"). Show ();}); $ ("# Special message") Draggable ();});  

However since the page loads (but it can appear later on user interaction) then the map panel is not visible, the events are not inclined. . Is there any way that I can hook up these events, even if MyPanel is not appearing on the initial page load?

"post-text" itemprop = "text">
  & lt; Script type = "text / javascript" & gt; Var prm = Sys.WebForms.PageRequestManager.getInstance (); Prm.add_endRequest (function () {bindPageEvents (); / / insert tie function here! [I used it as a real function to avoid typing it twice while using this method}}}; & Lt; / Script & gt;           

($ ("# Specialmeas"). ();});

  $ ("#specialmessage"). Draggable ();  

}); }); At some point outside the update point in the code

.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -