Home › Forums › JavaScript › Display elements by hovering/clicking link … Help!
- This topic is empty.
-
AuthorPosts
-
September 11, 2012 at 4:16 pm #38442
JosiahB
MemberI would like it so when the link is hovered over the “hidencontent” is displayed and when the mouse moves off it disappears, and when it is click on “hidencontent” would appear until ANYWHERE on the page is clicked (except for the “hidencontent” div and “morehidencontent” div) …
here is the code I have but it does not work like I would like … oh and I do have the css code that already has the display to none on the hiden and morehidencontent but is not included …Lots of interesting information … hover/click over me for more information!
Even more interesting information!
September 11, 2012 at 5:55 pm #109827zonger
MemberI don’t think you are supposed to “onclick” an ID. It should be some javascript function.
September 11, 2012 at 10:24 pm #109849JosiahB
Memberwell I know very little javascript and any help on how to accomplish what I was asking would be appreciated … :)
September 12, 2012 at 2:58 pm #109912zonger
Membercheck this http://jsfiddle.net/jZzMU/
September 12, 2012 at 3:20 pm #109913JosiahB
Memberthat’s sorta what I am looking for but … I would like for the element to TEMPORARILY be displayed when hovered over (it disappears when the link is not being hovered over) and when it is clicked on for it to stay visible until ANYWHERE on the page is clicked (other the the #hidentcontent and #morehidencontent divs) or the link is then clicked again
September 12, 2012 at 4:51 pm #109921amoss
ParticipantThis work?
http://jsfiddle.net/VTret/September 13, 2012 at 8:58 pm #109995JosiahB
MemberI think this is what I am looking for … but I can not seem to get it to work when I write up the html/css … maybe you could just put it in the form that will work right off of my desktop …
Thanks so much for your help so far! :D
September 13, 2012 at 10:26 pm #110015amoss
ParticipantWhat form would that be?
September 13, 2012 at 10:42 pm #110017JosiahB
Memberohh I am sorry I did not communicate that very well … hahaha Let me try again in English … when I copy out the individual sections and insert them into an html file the code does not work right … this is what I did …
hover/click over me!Lots of interesting information!
hover/click over me for more information!Even more interesting information!
September 13, 2012 at 10:49 pm #110019JosiahB
MemberOkay … this whole markdown thing is not working for me …. soo here is a link to what I am talking about :) http://bible.comze.com/popup.html
September 13, 2012 at 11:48 pm #110020amoss
ParticipantI’m seeing a few of these characters ​
​collapsed:hover:after{
content: “Lots of interesting information!”;
display: block;
}.collapsed2:hover:after{
content: “Even more interesting information!”;
display: block;
}​should be
.collapsed:hover:after{
content: “Lots of interesting information!”;
display: block;
}.collapsed2:hover:after{
content: “Even more interesting information!”;
display: block;
}September 13, 2012 at 11:59 pm #110021JosiahB
Memberok inserted that … but has not seemed to fix anything …
September 14, 2012 at 12:13 am #110022JosiahB
Memberok sorta got it now … but still have one ​
September 14, 2012 at 12:18 am #110023amoss
ParticipantEven more interesting information!
​