$("#register-modal").modal("hide"); if($('#login-modal').length > 0) { $("#login-modal").modal(); } else { $("body").prepend("\n
\n
\n