Page Preloader on page load only not on postback
  • Quick question - I'm using the page preloader add on in an asp.net page and just want it to fire on initial page load, not on post back. What is the best way to accomplish this?
    Thanks!
  • Figured it out - in the event that someone else encounters this issue.
    You can wrap the script that fires the pageloader add-on like this:

    <% if(!IsPostBack) { %>


    $(document).ready(function() {
    setTimeout(function(){
    $('body').addClass('loaded');
    }, 1000);
    });

    <% } %>
  • Thanks for the info ;-)
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion