0

When clicking on the word reachme, there is an event that occurs, the problem is not with the anchor or the event. The problem, keeping the #reachme div hidden until the anchor is clicked. I've adjusted the height of class.capsuleb, including adding display:none and/or overflow:hidden to the class.capsuleb as well as the same css rules as mentioned to #capsule.capsuleb without any success in hiding the div ?

[Link]

4
Contributors
11
Replies
51
Views
2 Years
Discussion Span
Last Post by Siberian
0

I haven't tried this yet but I think you would need to use a combination of .height() and .offset. Height can give you the height of the window, which means you can find your starting location for the popping up div.
Offset can find the location of the menu thereby giving you the end point of animation.
I don't think CSS can be used to detect the bottom of the page but I maybe wrong.

0

I had a dicussion with someone else regarding this problem, they mentioned it can be done with CSS, there solution was sloppy.

0

with a link the fixer has to view source to see what is wrong,
that will miss anything serverside that is stripped before being sent to the browser

the solution is the same basic method as a css dropdown flyout menu,
using :active and/or :focus, instead of :hover top open on click instead of mouseover

unthought example, may not be correct to the rest of the OP page code
the hidden div is always a child of the anchor div, located by css

<div id='anchor'>click me<div id='hiddenchild'>hidden text</div></div>

<style>
#hiddenchild {bottom:0; left:0; display:none;z-index:10;} //positioned & sat above other elements so it wont smoosh the page
#hiddenchild:focus {display:block;}
#anchor:focus #hiddenchild {display:block;}

hidden child does not display when anchor or hiddenchild is not focused,
you can click anchor, open hiddenchild then scroll around hiddenchiled untill you click anywhere else

Id was chosen as the op asked about singular items
classes and elements link similarly

Edited by almostbob

0

If :hover, the hidden element drops out again, when moving from the anchor to the hidden element, as soon as the mouse is no longer over the anchor
:focus remains until you focus on something else

error corection:

the hidden div is always a child of the anchor div, located by css

above should be
the hidden element is always a child of the anchor element, located by css
can be any elements as long as they are parent and child

Edited by almostbob

0

Do you want the div to be displayed for the duration the mouse button is clicked or do you want it to stay displayed after a single click?

0

I want it to be hidden until the event is clicked. Neither display:none or overflow:hidden, are revealing the DIV when the event is clicked.

0

Using the CSS display: none will mean that it will always be hidden. It sounds like you're looking for a solution which will require Javascript or JQuery. If it was a case that you just wanted it display for as long as the mouse button is clicked, you could use the tag.class:hover CSS feature.

I tend to avoid Javascript and JQuery unless it's absolutely necessary so I wouldn't be the best person to ask for a working solution here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.