Reputation: 1643
I'm trying to get a hidden div to display relative position (directly to the right of the hovered div.)
On the fiddle, when the cursor hovers over the div it enlarges and repositions. What I want to achieve but can't figure out... is how to display the div details for 'this' element only, relative to the hovered div.
The problems I'm having are:
Fiddle: http://jsfiddle.net/pssuT/1
Upvotes: 1
Views: 682
Reputation: 85145
To get the details absolutely positioned to the right of the containing element you can add position:relative
to the parent and position:absolute; left:100%
to the child.
To get the state to remain the same after a click, you can add a class on click and check for it in the hover functions.
See the solution: http://jsfiddle.net/pssuT/2/
Upvotes: 1