Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var AjaxRequest = Class.extend({
  2.  
  3.     init: function(url) {
  4.         this.url = url;
  5.     },
  6.  
  7.     process: function() {
  8.         var response;
  9.  
  10.         $.get("http://framework.dev/ajax.php", function(data) {
  11.             response = obj;
  12.         });
  13.  
  14.         return response;
  15.     }
  16.  
  17. });
  18.  
  19. $('#test').on('click', function() {
  20.     var request = new AjaxRequest('ajax.php');
  21.    
  22.     console.log(request.process());
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement