askew0

Untitled

Oct 7th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function test(data, callback) {
  2.     if(data !== null) {
  3.         if(typeof callback == 'function') {
  4.             callback.success();
  5.         }
  6.     } else {
  7.         if(typeof callback == 'function') {
  8.             callback.error();
  9.         }
  10.     }  
  11. }
  12.  
  13. test($(form).serialize(), function () {
  14.     success: function () {
  15.     },
  16.     error: function () {
  17.     }
  18. });
Advertisement
Add Comment
Please, Sign In to add comment