However, I would like it when the user selects "show two" that it shows the 2 div elements rather than specifically div2.

And for "show three" it would show all 3 divs.

You would loop through the select box values twice. Once to hide all of the divs, and a second time to show the divs. until you get to the one that was selected. Once you reach the one that was selected, you can break out of the loop.

However, I would like it when the user selects "show two" that it shows the 2 div elements rather than specifically div2.

And for "show three" it would show all 3 divs.

You would loop through the select box values twice. Once to hide all of the divs, and a second time to show the divs. until you get to the one that was selected. Once you reach the one that was selected, you can break out of the loop.