Thread
:
Stuck on a little Javascript project, could use a little help.
View Single Post
10-08-2012, 10:18 PM
PM User
|
#
5
devnull69
Senior Coder
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
With the "var" keyword you are declaring "selection_1" and "selection_2" as local variables to the method. Those local variables will be reinitialized with each call of the method.
If you omit the "var" keyword it should work better.
devnull69
View Public Profile
Find More Posts by devnull69