1// JavaScript Document 2$(document).ready(function() { 3 //Hide things 4 $("#SearchBox").css({"display":"none"}); 5 6 //If they click the search icon 7 $("#iconSearch").on('click', function() { 8 $("#SearchBox").slideToggle('slow'); 9 $("#SearchBoxInput").focus(); 10 }); 11 12 //Newsletter Signup Box 13 $(".btnNewsletterBox").on('click', function() { 14 var FName = $("form#frmNewsletter input[id=FirstName]").val(); 15 var LName = $("form#frmNewsletter input[id=LastName]").val(); 16 var Email = $("form#frmNewsletter input[id=Email]").val(); 17 var Type = $("form#frmNewsletter select[id=NewsletterType]").val(); 18 //console.log(Type); 19 if(FName.length && LName.length && Email.length){ 20 $("div.loading").fadeIn(300); 21 $.ajax({ 22 type: "get", 23 url: "cf-api/newsletter.cfc", 24 data: { 25 method: "Subscribe", 26 FirstName: FName, 27 LastName: LName, 28 Email: Email , 29 Type: Type 30 }, 31 dataType: "text" 32 }) 33 .done(function(response) { 34 //do something for success message 35 if(response == 1){ 36 $("#NewsletterBox").html("<h3>Please check your email to validate your newsletter subscription.</h3>"); 37 } 38 else if(response == 2){ 39 $("#NewsletterBox").html("<h3>That email address is already subscribed.</h3>"); 40 } 41 else if(response == 3){ 42 $("#NewsletterBox").html("<h3>You must choose what type subscriber you are.</h3>"); 43 } 44 else if(response == 0){ 45 $("#NewsletterBox").html("<h3>Failed</h3>"); 46 }; 47 }) 48 .fail(function(response) { 49 $("#NewsletterBox").html("<h3>Failed</h3>"); 50 }) 51 .always(function(response) { 52 //finshed 53 //$( "div.warning" ).fadeIn( 300 ).delay( 1500 ).fadeOut( 400 ); 54 55 }); //end ajax call 56 /**/ 57 } 58 }); 59 //END Newsletter Signup Box 60 61});
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.