Advertisement
Guest User

Advanced Morphing Modal sample

a guest
Feb 7th, 2015
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //First, you will need the Claudia's script implemented by me: https://mega.co.nz/#F!uZoGiBJB!5si9ySrPUL-m2Y5AX-Il-A
  2.  
  3. $("#yourform").submit(function() {
  4.     var inputs = $("#yourform").serializeArray(); //all inputs inside your form
  5.     $.ajax({
  6.         type: "POST",
  7.         url: "your_action.php",
  8.         data: inputs,
  9.         dataType: "text",
  10.         success: function(response) {
  11.             morphingModal($("#yourbutton"), response); //just be careful to echo some response on "your_action.php" ;D
  12.             //and notice that #yourbutton is the modal-trigger that will receive the effect(!)
  13.         }
  14.     });
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement