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