1(function($){ 2'use strict'; 3$(document).on('submit', '#llf-lead-form', function(e){ 4e.preventDefault(); 5var $form=$(this); 6var $btn=$form.find('.llf-submit'); 7var $success=$form.closest('.llf-form-wrap').find('.llf-success-msg'); 8var $error=$form.closest('.llf-form-wrap').find('.llf-error-msg'); 9$('.llf-invalid').removeClass('llf-invalid'); 10$success.hide().text(''); 11$error.hide().text(''); 12var valid=true; 13$form.find('[required]').each(function (){ 14if(! $(this).val().trim()){ 15$(this).addClass('llf-invalid'); 16valid=false; 17}}); 18if(! valid){ 19$error.text('Please fill in all required fields.').show(); 20return; 21} 22var data=$form.serializeArray(); 23data.push({ name: 'action', value: 'llf_submit' }); 24data.push({ name: 'nonce', value: llf_params.nonce }); 25$btn.prop('disabled', true); 26$btn.find('.llf-btn-text').hide(); 27$btn.find('.llf-btn-spinner').show(); 28$.post(llf_params.ajax_url, data) 29.done(function(res){ 30if(res.success){ 31$form.hide(); 32$success.text(res.data.message).show(); 33}else{ 34$error.text(res.data.message).show(); 35$btn.prop('disabled', false); 36$btn.find('.llf-btn-text').show(); 37$btn.find('.llf-btn-spinner').hide(); 38}}) 39.fail(function (){ 40$error.text('Something went wrong. Please try again.').show(); 41$btn.prop('disabled', false); 42$btn.find('.llf-btn-text').show(); 43$btn.find('.llf-btn-spinner').hide(); 44}); 45}); 46$(document).on('input change', '.llf-invalid', function (){ 47if($(this).val().trim()){ 48$(this).removeClass('llf-invalid'); 49}}); 50})(jQuery); 51;
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.