I'm having a problem that a statusbar get displayed over the content of the page. The problem is when I try to calculate the margin-top of the content (this to display the content correct) the statusbar height always returns 0 px because the statusbar gets displayed after the page has been loaded.
Is there a way to dynamically check if the div #statusbar is displayed or not? LIVE?
Something like this, but dynamically :
$('#statusbar').is(':visible') {
$('.content').css('margin-top', $('#statusbar').height());
}
I'm branding SharePoint so the statusbar get displayed by the framework. With this layout I can't use css to do this.
Check this code: This is what happens.
The delay on the example is just for you guys to understand what's happening. The statusbar gets displayed after the DOM / site has been loaded.
I need to listen to changes on a spesific selector. (height/vibility etc.)
Solution
or
jQuery event to trigger action when a div is made visible mentioned by @naim shaikh