How do you reference a custom object outside of the function it was created in with JavaScript?
- by Jack Roscoe
Hi,
I'm currently using JavaScript and jQuery.
I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes.
Within the same function, I can access these new object's attributes no problem, however once I'm inside a different function I can't seem to reference them properly and therefore cannot access the objects or the information inside them.
What's the correct way to reference the attributes of an object which was created in a different function to the one looking for the information?