jQuery hover scroll for very long menus -


this loosely based on chris coyier's snippet: https://css-tricks.com/long-dropdowns-solution/

i'm working on long-dropdown solution, , eliminate space @ bottom, , perhaps make little easier click items close mouse. hover on menu scroll it.

here's fiddle: https://jsfiddle.net/3hanq4wt/1/

the space caused js moving ul upwards. need improved movement ratio so ul doesn't move quite high when scrolling.

i tried several things, such as:

     var remainder = containerbottom - ( list.offset().top + listheight );       //this remainder ought useful somehow.  surely must. 

i realize not ideal ux solution cases, have layout requires fixed height (assigned dynamically) container overflow hidden.

thanks :)

i able rid of space in fiddle adding pixels offset.

containertop = container.offset().top + 50, 

or using listheight variable

listheight = list.outerheight() - 200, 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -