Monday, 15 February 2010

javascript - Gridview loading animation using JQuery is a still frame i.e. does not animate -


Hello and thanks for watching.

In my previous project, I used to use an UpdatePanel to load the loader GIF when I was busy in making data bound with my gridview. I wanted to transfer this part of the code to JQuery so that I change the update panel with an IMG tag to connect to GIF after seeing this solution ()

In my index.html page I have

    

And I called ShowLoaderImage from ASP: The button I was using to populate the source of Gridview.

  & lt; Asp: button id = "View_Data_Button" CssClass = "Datatoon" OnClick = "View_Data_Button_Click" OnClientClick = "ShowLoader Image ()" Runat = "Server" Text = "View Data" />   

I was hoping to start spinning the image when I click on the button to load the gridview, and disappeared if the gridview was loaded from the document. Instead, I see a frozen frame of GIF - no animation. How can I fix it?

I suggest changing the html in the element

  $ ('# Data_loding_div'). Html ('& lt; img alt = "loadingImage" src = "/ images / loadingImage.gif" / & gt;')   

Getting later data, $ ('# data_loding_div'). Html (data);

No comments:

Post a Comment