I
I
Igor2015-10-04 09:26:33
css
Igor, 2015-10-04 09:26:33

How to connect SweetAlert to an existing JS script?

welovepavel.esy.es/techno/index.html

$(document).ready(function() {

  $("#form").submit(function() {
    $.ajax({
      type: "POST",
      url: "mail.php",
      data: $(this).serialize()
    }).done(function() {
      $(this).find("input").val("");
    
      <b>СЮДА</b>			swal("Good job!", "You clicked the button!", "success");
      $("#form").trigger("reset");
    });
    return false;
  });
  
});

<script src="common.js"></script>

how to bind to this sweetalert code?
css, js libraries backed up for sweetAlert
thanks!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Volintsev, 2015-10-04
@IgorBee

1. You have a typo in the line <script scr="jsB/sweetalert.min.js"></script>
2. There is an extra line in the welovepavel.esy.es/techno/common.js<script src="common.js"></script>
file Otherwise, I don’t see any problems

R
Rsa97, 2015-10-04
@Rsa97

And what's the problem then? Download the library and add its download to the file. It 's detailed on the website .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question