Hi,

Just wondering whether it's possible to get the $.getJSON -generated  
object into local scope? Something along the lines of this:

$(document).ready(function(){

        createObject();
        appendObject();

});

function createObject(){
        $.getJSON('animal.js',function(json){
                animal = json;
        });
}

function appendObject(){
        $("body").append(animal.type);
}

-------------8<---------------8<-----------------------

my json: { "type" : "cat" }

-------------8<---------------8<-----------------------

Thanks!

--
Jani

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to