Javascript help!
- Started
- Last post
- 10 Responses
- CygnusZero4
Im not a dev expert by any means. Im setting up a drop down menu that I grabbed from somewhere else. Need to do 2 things to it.
When you click on one of the top 3 buttons, I need that button to actually turn off. So if you click products for example, I need that button to be invisible, and only its drop down visible.
Also, there is some sort of dotted line appearing around the top buttons. How do you remove that?
- dbloc0
the dotted line is here.
ul.dropdown li {
background-color: #0000FF;
border: 1px dotted #D0D0D0;
float: left;
padding: 0 20px;
}
- CygnusZero40
Good thing I looked very closely at this so far, right? hehe
Turning the top buttons off is baffling me. I tried using some css but cant seem to get it to work right.
- dbloc0
need to add an .active class
- Not a developer. What is that? I basically need my handheld or this will never get done.CygnusZero4
- chrisRG0
in a nutshell:
.hidden{visible:none}
then on click:
event.target.classList.add('hidd...you may do a loop thru all elements on the chain to remove .hidden from the others items
- Not a develop. Need hand held, how do I implement this into the code I posted on jsfiddle.CygnusZero4
- Here is is. I have absolutely no clue what you just said or how to get it into this. http://jsfiddle.net/…CygnusZero4
- paypal me three fiddyernexbcn
- lolCygnusZero4
- CygnusZero40
Oh, and I also need it so that when you click one of the others, any that are currently off need to be turned back on. This is way out of what I know how to do. All I have is that code i posted on jsfiddle.
- ernexbcn0
RIP JavaScript.
- dbloc0
JS doesn't work in firefox
- CygnusZero40
Ive already viewed this in firefox. It works and has JS in it.
- CygnusZero40
Well apparently I can just do showhide in dreamweaver. Any reason why noone mentioned that, or is it frowned upon because its done through a dialog box?
- Because very few people here use Dreamweaver?hereswhatidid
- Especially the WYSIWYG portion of it.hereswhatidid
- Ah, the elite crowd. But I said I wasnt a developer!CygnusZero4
- Not necessarily elitist, you just didn't specify you were using dreamweaver.hereswhatidid
- I didnt know that was something that needed to be specified.CygnusZero4
- I just assumed when you see me say im not a developer but working on a website that youd know.CygnusZero4
- BattleAxe0
was asked in a recent job interview what is the difference between == and === in js?
- loldbloc
- I rarely see === useddbloc
- those will return different values and you should definitely be using them in specific instanceshereswhatidid
- https://github.com/r…hereswhatidid
- ya needles to say prob did not get itBattleAxe