Create DropDown menu "DropUp"

I am trying to implement a drop down menu. As a starting point, I use the existing dropdown menu built using HTML / CSS / jQuery based on the Simple JQuery Dropdown trick. (Since I couldn't get pure css alone to work on touch devices, as they relied on hover states).

I advanced a bit with ul.dropdown ul {top: -100%; } ul.dropdown ul {top: -100%; } , but this only moves the dropdown up one line, I'm not sure what semantic css is.

Any ideas how I could achieve this?

I made jsfiddle problems here - http://jsfiddle.net/TTTb6/

+4
source share
3 answers

Try changing this:

 ul.dropdown ul { bottom: 100%; } 

Updated jsfiddle

+4
source

Instead of top use bottom: 100%; :

 ul.dropdown ul { position: absolute; bottom: 100%; } 
+2
source

For touch devices, you need to write code in the click event. please check it here, you will get an answer ...

Click to close jQuery popup menu on mobile devices while preserving different behavior

-2
source

All Articles