Skip to content

Replaces a select element with a div that includes a list of links built from the select object options

Notifications You must be signed in to change notification settings

localpcguy/ReplaceDropdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/****************************************************************
replaceDropdown()	swaps the dropdown for a Select List to use 
			HTML elements that can accept styling.
Created by: Mike Behnke
GitHub: https://github.com/localpcguy/ReplaceDropdown
Version: 0.2
Params: Select ID
Option defaults:
			divIDtext: "LinkList",
			linkIDtext: "Link",
			linkText: "",
			parent: "", // required for flipTop
			flipTop: false,
			ddClass: "ddlist",
			hideFirst: true
Usage:	$("select").replaceDropdown();
	$("select").replaceDropdown({ ddClass: "dropdownList"});
ToDo:	
	1) Switch to class based selector rather than ID
	2) Store created elements in closure for future manipulation rather than lookup each time
	3) Setup timer variable and option to auto-close after the timer expires
	4) Refactor code for size/performance
	5) Refactor code into better "plugin" boilerplate
*****************************************************************/

About

Replaces a select element with a div that includes a list of links built from the select object options

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published