Welcome to the Treehouse Community
Looking to learn something new?
Konrad Pilch2,435 Points
How to get a child dropdown menu? -jQuery
So if you look on this codepen and you toggle the link that has a submenu, as youc an see, i placed that submenu with absolute position to position it.
If we look at bootstrap, here and you click the submenu, they are relative to the main link, placed underneeth them, no matter where they are, and me instead, i used absolute left 100px so tyle it etc..
How can i make a submenu or menu like bootstrap?
Tushar SinghCourses Plus Student 8,692 Points
I used something similar to this http://codepen.io/tushar_13/pen/WwXVGB --hovertext over the buttons, you can check it out.(regarding the positioning)--your relativity issue.
But I think in this case you can use slideup and slidedown(jquery)-that's what you are using in the bootstrap.
What I mean by that is when a user clicks/hovers(your wish), you you can use the children() property to slideup or slideDown your list items.
I think this is what you are looking for http://callmenick.com/post/slide-down-menu-with-jquery-and-css