This snippet will add a class to the body when the page alert is active. Useful for styling page based on presence of alert.
$(document).ready(function() {
if ($(".page-alert-message").size() > 0) {
var inlineStyle = $('.page-alert-message').attr('style');
if (inlineStyle == "display:none") {
$("body").removeClass("message-bar-active");
} else {
$("body").addClass("message-bar-active");
}
}
$('#page-alert-dismiss').click(function() {
$("body").removeClass("message-bar-active");
});
}); //end doc ready