1(function ($, root, undefined) { 2 3 $(function () { 4 'use strict'; 5 // DOM ready, take it away 6 }); 7 8 9 $('#user-login-submit').click(function(){ 10 $('.message').text(''); 11 var username = $('#username').val(); 12 var password = $('#password').val(); 13 var checkedValue = $('#remember:checked').val(); 14 15 if(username == '' && password == ''){ 16 $('#username').parent().addClass('error'); 17 $('#password').parent().addClass('error'); 18 } 19 20 if(username == ''){ 21 $('#username').parent().addClass('error'); 22 return false; 23 }else{ 24 $('#username').parent().removeClass('error'); 25 } 26 if(password == ''){ 27 $('#password').parent().addClass('error'); 28 return false; 29 }else{ 30 $('#password').parent().removeClass('error'); 31 } 32 33 jQuery.ajax({ 34 type: 'post', 35 url: ajaxurl, 36 data: { 37 action: 'nf_member_login', 38 password: password, 39 username: username, 40 checkedValue: checkedValue 41 }, 42 success: function(data) { 43 if(data==1){ 44 window.location.href = '/'; 45 }else{ 46 $('.login-form .form-body').prepend($('<p>').addClass('message').text(data)); 47 } 48 } 49 }); 50 }); 51 52 53})(jQuery, this);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.