When a page is checked out by a user, the page status bar shows

"Recent draft not published Visitors can't see bla bla bla"

The problem I face with this status bar is that, it is appearing after the page load which causes my footer to disappear.

Is there a way I can detect when the page status bar appears in my page?

Currently I am having


This is in the document.ready function but the problem is that the status bar appears after some 2-3 secs

P.S: I dont want to use setTimeout, looking for a cleaner solution that detects the appearing of this status bar


Sounds to me you Footer is not disappearing but moved out of the Viewport because something (a Status message) above it was inserted into the DOM.

That means you Footer will 'dissapear' for any Status message or other content displayed.

  • There is nothing wrong with using ```setTimeout`` as long as you as a developer are aware of what you are doing.
    SharePoint itself uses it all over the place and has an 'easy' wrapper for it (defined in init.js)

    function _spYield(b, a) {
      if (a > 0) window.setTimeout(function() { _spYield(b, a - 1) }, 0);
          else b()
     //note: a is times this function cycles, not milliseconds!
     //note: this does not deserve a price for Best Javacript..
  • It might better to use absolute positioning for your Footer so it is not related to other page content

    #footer {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.