I'm using SweetAlert.
http://tristanedwards.me/sweetalert
For this I need to initialize the plugin
<script src="lib/sweet-alert.min.js"></script>
<link rel="stylesheet" type="text/css" href="lib/sweet-alert.css">
I need to call the function swal
from my file test.js, which is:
var accountnumber_c = $('#accountnumber_c').val();
if($('#accountnumber_c').val()=="")
{
return;
}
swal('accountnumber_c');
This works in a php file but in test.js it gives "swal function is not defined".
Also how do I initialize the plugin in test.js?