javascript - Foundation contact form js not working -


i have contact form ready go reason when gulp uglify returns error , won't minify. javascript seems correct , uglify when remove ajax call ajax call breaks. insight? here's js:

$('.contact-form').on('valid.fndtn.abide', function() {         var name = $(".contact-form input#name").val();         var email = $(".contact-form input#email").val();         var message = $(".contact-form textarea#message").val;         // data response         var datastring = 'name=' + name +              '& email =' + email +              '& message =' + message;         //begin ajax call         $.ajax({                 type: "post",                 url: "php/mail.php",                 data: datastring,                 success: function() {                     $('.contact-form').html("<div id ='success'></div>");                     $('#success').html("<h2>thanks!</h2>")                             .append("<p>dear" + name + "!, forward working you.</p>")                             .hide()                             .fadein(1500);                             },         }); //ajax call         return false; }); 

jslint throws error on code. removing trailing comma seems clear up:

.fadein(1500); }, /* <-- remove comma */ 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -