jquery effect highlight not working in asp.net update panel -
i have 2 update panels follows (when linkbutton clicked i'm trying 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 , registering script on page follows
scriptmanager.registerclientscriptblock(me, me.gettype(), "divhigh", "$('#shdr').effect('highlight', {}, 3000);", true) this highlights div after postback timeout value doesn't work continues show highlighted color , doesn't change back.
what can causing not work?
if you're using updatepanel - i.e. script manager
$(function () {  //code runs before update panel fired.          //listen update panel         sys.webforms.pagerequestmanager.getinstance().add_endrequest(endrequesthandler);         //re-initialize jquery after auto post back.         function endrequesthandler(sender, args) {             //do work after update panel fires.         }      }); so have jquery code , same code inside endrequesthandler function if want able run after post back.
Comments
Post a Comment