Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery-ui dropdown menu style

i am using jquery-ui 1.9.2 version which has a new menu option in there. Is there any way that i can change the menu style to be a drop-down just like http://onehackoranother.com/projects/jquery/droppy/#

I referred to http://wiki.jqueryui.com/w/page/12137997/Menu ,but those are plug-ins.

I do not want to use another plugin for this, i want to alter the same jquery-ui itself, is there any way to do this?

like image 525
jeev Avatar asked Nov 03 '22 06:11

jeev


1 Answers

You can use the position option to accomplish this. I'll whip up and add a fiddle with the details when I'm less busy, but the gist is:

$('#menu').menu({
    position: { my: 'left top', at: 'left bottom' }
});

Essentially that is telling jQuery UI to put the sub menu's top-left corner (my: 'left top') on the bottom-left corner of the parent element (at: 'left bottom').

You'll probably need to fiddle with the jquery.ui.menu.css file to get it exactly right. I actually ignore that CSS altogether most of the time.

like image 99
The Maniac Avatar answered Jan 04 '23 13:01

The Maniac