Quantcast
Channel: VBForums - jQuery
Viewing all articles
Browse latest Browse all 58

Selecting a menu option using jQuery?

$
0
0
I have a web page that contains a menu built using <div> tags. The structure is below:

Code:

            <div id="mnuStructure" style="border-top: 1px Solid Gray; border-bottom: 1px Solid Gray">
                <div id="opt1" class="menuItems2"><a href="#">Option 1</a></div>
                <div id="opt2" class="menuItems2"><a href="#">Option 2</a></div>
                <div id="opt3" class="menuItems2"><a href="#">Option 3</a></div>
                <div id="opt4" class="menuItems2"><a href="#">Option 4</a></div>
                <div id="opt5" class="menuItems2"><a href="#">Option 5</a></div> 
            </div>

What I'm trying to do, is load the menu option selected into a variable using jQuery. I'm not real good with jQuery yet some I'm kinda stuck. What is the best way to do this?

Thanks,

Viewing all articles
Browse latest Browse all 58

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>