down menu with controls
I wish to create a menu (a sign-up menu), see this to get an idea of it. When user clicks on this button/link a drop-down menu appears, using which he can do something (here login).
The behaviour of the link should be the following:
I did somehow managed to get first three working, but then the controls within the drop-down menu (4th behaviour) are not working.
The javascript/jQuery code along with html code is given here (jsfiddle link, same as above). You can fork it and make changes.
Thanks.
check this
http://thefinishedbox.com/files/freebies/loginfreebie/index.html
Download tha code
http://thefinishedbox.com/freebies/scripts/jquery-dropdown-login/
I made a fork of what you have on your jsFiddle: http://jsfiddle.net/DukyJ/
If you look at the code I just added an extra div to have the page's content so I don't have to assign click events to the whole body just only to that div. Then, I removed the return false and the stopProppagation and just added a '#' to the link in the href because it wasn't necesary. And finally just added some style to the signin link and the singin panel so you can see that the menu appears over the content as I suppose you want it to appear.
链接地址: http://www.djcxy.com/p/83966.html上一篇: 如何防止下拉菜单从用户点击进入时关闭?
下一篇: 带控件的下拉菜单