jQuery(document).ready(function($){ $(".widget_pw_login_widget").on("click", "input[type='submit']", function(){ var mainDiv = $(this).parents('.sp-main-div'); if (mainDiv.length > 0 && mainDiv.children('.is_ajax_authentication').length==1){ var hidden = mainDiv.children('.is_ajax_authentication'); if (hidden.attr('value')=='0'){ return true; } } var login_header = mainDiv.children('.sp-login-header'); //ssl check var force_ssl_login = mainDiv.find(".force_ssl_login"); if (force_ssl_login.length>0 && force_ssl_login.val()=='true' && document.location.protocol!='https:' ){ login_header.children(".sp-ssl-requires-msg").slideDown(100); return false; } var loadingDiv = mainDiv.children(".sp-loading-img"); loadingDiv.show(); mainDiv.children("div:not('.sp-loading-img')").css('opacity', '0.4'); var form = $(this).parents("form"); login_header.hide(); login_header.empty(); var serializedForm = form.serialize(); var redirect_exec = false; $.post(ajax_object.ajax_url, serializedForm, function(data) { //nonce check if (data=='-1'){ login_header.html("