Following will return the index of li you are hovering over within it's
UL onBeforeShow: function() { var parentIndex= $(this).parent("li").parent("ul").find(">li").index($(this).parent("li")); ////// use parentIndex to calculate offset for (this)- per API *this* is the UL about to be shown } galilee99 wrote: Hi, any tips on how to count the number of li's?? On Jul 8, 11:51 am, Charlie <charlie...@gmail.com> wrote:you can use onBeforeShow to insert function to calculate offset for css. Number of li's x height of li etc Use "(this)" to refer to ul about to open and apply css to it galilee99 wrote:Hi, I'm trying to setup a vertical menu where the submenus align to the top of the parent ul rather than the parent li. as in this image:http://nickjacobs.net.nz/tmp/superfish.pngbut not sure where to start?? any help appreciated. |
- [jQuery] Superfish - Align sub menus to top galilee99
- [jQuery] Re: Superfish - Align sub menus to top Charlie
- [jQuery] Re: Superfish - Align sub menus to top galilee99
- [jQuery] Re: Superfish - Align sub menus to top Charlie
- [jQuery] Re: Superfish - Align sub menus to top allenm541