Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-13-2013, 01:11 PM   PM User | #1
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Question Search box options drop down - Switch active to selected?

Hello,

I have a search box on my website, with a drop down to show the options to fine tune your search. Inside this drop down, there is a list, however I do not know how many options will be in this list.

Code:
            <div class="NewSearchActions">
                <a href="#" onclick="mopen('searchby'); parentNode.className=('active')"><b class="caret"></b></a>
                <div id="searchby">
                    <div class="wrap">
                        <ul>
                        	<li><a href="#">Item One</a></li>
                            <li><a href="#">Item Two</a></li>
                            <li><a href="#">Item Three</a></li>
                            <li><a href="#">Item Four</a></li>
                    	</ul>
                    </div>
                </div>
            </div>

You can view the page for the website here; https://tornhq.com/Top_Menu/Index-New.html, which looks a bit messy for this drop down as I need to style it properly. I would like the one you click on to set to the active class and, if another one has previously been clicked to switch back.

Thank you for any help and/or advice!

Best Regards,
Tim

Last edited by MrTIMarshall; 03-13-2013 at 05:48 PM..
MrTIMarshall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:48 AM.


Advertisement
Log in to turn off these ads.