Welcome To Snipplr


Everyone's Recent jQuery Snippets Tagged dropdown



« Prev 1 Next »
For some reason setting a default value for select elements does not work. This one line of jquery solves that problem. Assign a value (value="something") to the select tag that is to be the default value. With jquery get all select elements with a...
0 1179 posted 11 years ago by halk
Simple solution found via link. Just edit code from demo page(s). Also http://uniformjs.com/
0 772 posted 12 years ago by rumremix
Set a variable by getting the URLs id with PHP. Find the the option with the name value that is equal with the variable and add "selected" to it.
0 759 posted 12 years ago by LadyLoomis
This snippet gets the value of the selected dropdown
0 747 posted 12 years ago by jjmu15
The option elements in the original select may provide an image and a second line of text by using a data-img and a data-info attribute.
7 1162 posted 13 years ago by peckham
jQuery to make Joomla-format menu dropdowns appear on hover. Change "#mainnav" to menu container selector.
1 665 posted 13 years ago by cviolette
Custom dropdown field, replace defaut dropdown style with custom design. This function does not replace the select field.
1 682 posted 13 years ago by touffies
So recently I was asked to change a navigation style of an existing site to drop-down menus. Simple, I thought, just use one of the many existing drop-down plugins. I tried many, but most seemed to use hardcoded styles and I had a few problems (so...
0 666 posted 13 years ago by dom111
Incredibly useful. Great when you need to remove and add options to selectboxes.
0 771 posted 13 years ago by Meander365
« Prev 1 Next »