Today we want to share some simple drop-down list effects with you. The idea is to transform a normal select input into something more appealing with a jQuery plugin. The expanding of the options will happen with a transition and parameters can be configured in a way to achieve unique effects.
After the great custom drop-down list styles made by Hugo in his tutorial Custom Drop-Down List Styling, we wanted to make it simple to create a custom structure from a normal select input (without multiple option selection). So, we’ve come up with this little plugin that will allow some custom styling of the drop-down list. With the generated structure it is easy to apply some simple effects in order to spice it up.
Please note that the CSS transforms and transitions only work in browsers that support them.
Without JavaScript, the normal select input will simply be shown.
The icon font was created with IcoMoon.
So, we start out with a select input, for example:
<select id="cd-dropdown" class="cd-select"> <option value="-1" selected>Choose an animal</option> <option value="1" class="icon-monkey">Monkey</option> <option value="2" class="icon-bear">Bear</option> <option value="3" class="icon-squirrel">Squirrel</option> <option value="4" class="icon-elephant">Elephant</option> </select>
A dropdown plugin can be applied as follows:
$( '#cd-dropdown' ).dropdown();
The select and the options get transformed into the following structure:
<div class="cd-dropdown"> <span>Choose an animal</span> <input type="hidden" name="cd-dropdown"> <ul> <li data-value="1"><span class="icon-monkey">Monkey</span></li> <li data-value="2"><span class="icon-bear">Bear</span></li> <li data-value="3"><span class="icon-squirrel">Squirrel</span></li> <li data-value="4"><span class="icon-elephant">Elephant</span></li> </ul> </div>
When clicking on the first span, we will apply the class “cd-active” to its parent, the division with the class “cd-dropdown”. When selecting an option, the respective span will get inserted into the first one.
Options
The following default options are available:
speed : 300, easing : 'ease', gutter : 0, // initial stack effect stack : true, // delay between each option animation delay : 0, // random angle and positions for the options random : false, // rotated [right || left || false]: the options will be rotated to the right side or left side // make sure to set the transform-origin in the style sheet rotated : false, // effect to slide in the options // value is the margin to start with slidingIn : false
The basic common styling is defined in the common.css file and you can see the individual styles in the styleN.css style sheets.
Demos
Check out the demos to see some different configurations in action:
- Demo 1: Gutter of 5, items stacked with an offset
- Demo 2: Like demo 1, but we expand the items with a slight random angle/left values.
- Demo 3: Option items are spread around a circle
- Demo 4: Zero gutter and 3D rotation of the select label when active
- Demo 5: Option items slide in laterally (alternating)
- Demo 6: Same as demo 5 but with a delay
Hope you enjoy this little plugin!

Hello how do I put two menu with different subject on the site? I tried to copy the HTML the second does not work.
Hello ! How can I put this ( demo 1 ) into my wordpress page ? please help me, thanks : )
Great plugin!! But, how to remove or custom the arrow icon?!
Hi there,
Amazing plugin, thanks so much :)
I’m having trouble activating the chosen option when integrated into WordPress – Woocommerce 2.0 product filter. It all seems to work fine in terms of appearance, when an option is clicked the value is selected but no refresh/trigger is happening :S – am I missing something simple?
Is it something to do with the ‘<option value= ' .. being turned into '<li data-value=' ?
Many thanks in advance to anyone who can shine some light on this.
Hi, nice work.
But is it possible to hide the menue on clicking outside the box?
Thx and cheers
hello, how do i add more icons than the ones provided? thanks
Hello ! How can I put this ( demo 4 ) into my blogger page ? please help me, thanks : )
I’ve tried a few things, but has anyone thought about how this could be styled to ‘drop’ up rather than down?
Nice work Mary Lou