i have two update panels as follows (when linkbutton is clicked i’m trying to highlight div)
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Linkbutton id="btnChange" runat="server" OnCommand="LinkButton_Command"/>
<asp:Linkbutton id="btnChange2" runat="server" OnCommand="LinkButton_Command"/>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<div id="shdr">Hello there!</div>
</ContentTemplate>
</asp:UpdatePanel>
I’m overriding OnLoadComplete and registering this script on page as follows
ScriptManager.RegisterClientScriptBlock(Me, Me.GetType(), "divHigh", "$('#shdr').effect('highlight', {}, 3000);", True)
This highlights the div after postback but the timeout value doesn’t work it continues to show highlighted color and doesn’t change back.
What can be causing this not to work?
If you’re using an UpdatePanel – i.e. a
Script ManagerSo essentially you will have your jQuery code and then the same code inside the
EndRequestHandlerfunction if you want it to be able to run after a post back.