I’m using jquery for my site, I have a list of variables that need to be called once a button is pressed. Basically, I need to determine the variable from the class name! 🙁
For example: http://jsfiddle.net/shannonhochkins/f6dLQ/
So it returns the class name of “website”, which also is the variable “website” but i need to then somehow determine make it equal the variable not the string “website”?
Please help!
If you declare the variable in the global scope i.e. not in any function, it will be a property of the window object, and can be easily retrieved
http://jsfiddle.net/f6dLQ/3/