Hi am trying to implement a simple menu using jquery but with no luck.
Kindly look into this fiddle.Thanks in advance
http://jsfiddle.net/Gg3cR/12/
Asked
Active
Viewed 84 times
0

Srini
- 420
- 1
- 5
- 17
1 Answers
1
instead of visibility: hidden; you need display: none; to start out with
here is updated fiddle: http://jsfiddle.net/Gg3cR/13/
EDIT: It will probably be better in the long run to keep the list in a div, and show/hide the div on mouse over
Here is a link to show the difference between the two: http://www.w3schools.com/css/css_display_visibility.asp
if you want to use visibility still, you could use .css('visibility', visibilityState)

Troy Cosentino
- 4,658
- 9
- 37
- 59
-
Thanks a lot..But why should it be display:none and not visibility:hidden? – Srini Jul 29 '12 at 10:41
-
1"The matched elements will be hidden immediately, with no animation. This is roughly equivalent to calling .css('display', 'none')" - from http://api.jquery.com/hide/ - basically since hide and show use the display property, you need to also – Troy Cosentino Jul 29 '12 at 10:44