JQTransform Not Working After Partial Update ASP.NET Ajax

I have the following update panel that works...

After I press the button (partial page update) the page loses the JQTransform images.

The update panel works fine and the current datetime is displayed correctly.

How do I make the images stay?


//Header Files

<script src="jquery-1.5.1.min.js" type="text/javascript"></script>

    <link href="jqtransform.css" rel="stylesheet" type="text/css" />

    <script src="jquery.jqtransform.js" type="text/javascript"></script>


// code behind

protected void Page_Load(object sender, EventArgs e)
{

    string script = "$(function () { $('form').jqTransform() });";

    ScriptManager.RegisterStartupScript(Page, GetType(), "jqTransform", script, true);

        }

protected void btnTest_Click(object sender, EventArgs e)
{
            lblTest.Text = DateTime.Now.ToString();
}


// aspx page
<asp:UpdatePanel ID="updTest" runat="server" UpdateMode="Conditional">

<ContentTemplate>
    <div class="rowElem">
    <asp:Button ID="btnTest" runat="server" Text="submit" onclick="btnTest_Click" />
    </div>
    <asp:Label ID="lblTest" runat="server" />
    
</ContentTemplate>

<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnTest" EventName="Click" />
</Triggers>

</asp:UpdatePanel>

Open in new window

ButtonImages.png
DarrenshomeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DarrenshomeAuthor Commented:
Add this code to your page header and the update will work as expected!
<script type="text/JavaScript">

$(document).ready(function(){
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    
      prm.add_endRequest(function() {

           $('.rowElem').jqTransform();
    });
});



</script>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DarrenshomeAuthor Commented:
This was the solution to my problem and it works a treat!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.