Git Product home page Git Product logo

combo-select's Introduction

Combo Select

Converts a select box into a searchable and keyboard friendly interface. Fallbacks to native select on mobile and ipad devices.

  • Search and filter select items
  • Mobile and Tablet friendly (fallbacks to native select)
  • Keyboard accessible
  • Easily to style
  • Data attribute support
  • Support both numeric and string data types in select
  • Supports implict style attributes

Browser support

  • Safari, Chrome, Firefox, Opera
  • iOS, Android, IE Mobile
  • Internet Explorer IE 8 and above

How to use

	<select data-theme="bootstrap">
		<option value="">Select value</option>
		<option>1</option>
		<option>2</option>
	</select>
	/* Any data-* options can be added */

    $('select').comboSelect({
        comboClass         : 'combo-select', /* outer container class */
		comboArrowClass    : 'combo-select-arrow', /* arrow class */
		comboDropDownClass : 'combo-drop-down', /* dropdown class */
		inputClass         : 'combobox-input text-input', /* Input element class */
		disabledClass      : 'option-disabled', /* Disabled class */
		hoverClass         : 'option-hover', /* dropdown list hover class */
		selectedClass      : 'option-selected', /* dropdown list selected class */
		markerClass        : 'combo-marker', /* Search marker class */
		maxHeight          : 200, /* Max height of dropdown */
		themeClass         : '', /* Theme using external classes */
		extendStyle		   : true /* Copy all inline styles from original select */
    })

Markup after conversion

	<div class="combo-select">
		<select name="month" tabindex="-1">
		</select>
		<div class="combo-select-arrow"></div>
		<ul class="combo-drop-down">
			<li>....</li>
		</ul>
		<input type="text" placeholder="Select Month" class="combobox-input text-input">
	</div>

Todo

  • Support multiple and size attributes in select
  • Optgroup and disabled option support - Done
  • API to destroy/update - Done
  • Unit tests

combo-select's People

Contributors

rmdort avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.