I have a couple global variables that are being set to $(this) on mouseup of the small 1 or 2 buttons. Based on the comparison of the global variables on mouseup my code should do something. When I step through the code in Firebug, the variable gets set and then as I step through a couple more lines, I get the following:
ReferenceError: little_r is not defined.
I used an alert to see the value of the global and its always undefined. Why is the global variable not saving the value?
The reason little_r (etc.) are always null is because you’ve added little_r as a parameter to :
therefore creating a local variable. When you try to access little_r you’re accessing the local (undefined) version.
I can’t see what you’re ultimately trying to achieve but your problem lies with local variables shadowing your global version