Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var AjaxRequest = Class.extend({
- init: function(url) {
- this.url = url;
- },
- process: function() {
- var response;
- $.get("http://framework.dev/ajax.php", function(data) {
- response = obj;
- });
- return response;
- }
- });
- $('#test').on('click', function() {
- var request = new AjaxRequest('ajax.php');
- console.log(request.process());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement