if ($("body > .login-required-notify-wrapper").length) { $( "body > .login-required-notify-wrapper" ).show(); } else { $("body").append('
'); }