trowley 0 Report post Posted January 24, 2011 Hey: Is there a way to set a var within the $(document).ready function and retrieve the value in a function outside of the that? Thanks! Share this post Link to post Share on other sites
BeeDev 2 Report post Posted January 25, 2011 yes declare the var outside $(document).ready and that should do it: var myVar; $(document).ready(function(){ myVar = 1 echoMyVar(); }); function echoMyVar(){ alert(myVar); }; Share this post Link to post Share on other sites