Giter Club home page Giter Club logo

selectioner's Introduction

#Selectioner

A light-weight jQuery replacement for HTML select boxes.

Introduction

What it is

  • Single-select
  • Multi-select
  • Combo-box

What it works in

Tested in Google Chrome 26, Firefox 19, Safari 5, Opera 12, Internet Explorer 9 and Internet Explorer 8.

It's actually functional in Internet Explorer 6 and 7, although there are numerous cosmetic bugs. These could be corrected if you are willing to write your own CSS, but they are not going to be officially supported by this project.

How to use it

Make sure that you've included the following in your project:

See the demo page for a more in-depth examples.

Single-select

This will create a control that will allow you to select a single item.

<select id="MySingleSelect"> ... </select>
<script>
	$('#MySingleSelect').singleSelect();
</script>

Multi-select

This will create a control that will allow you to select multiple items.

<select id="MyMultiSelect" multiple="multiple"> ... </select>
<script>
	$('#MyMultiSelect').multiSelect();
</script>

Combo-select

This will create a control that will allow you to select a single item, or enter your own text.

<input type="text" id="MyComboText" placeholder="Select an option" />
<select id="MyComboSelect" multiple="multiple"> ... </select>
<script>
	$('#MyComboSelect').comboSelect('#MyComboText');
</script>

What features it has

  • It has basic keyboard support; you can use most of it's functionality without a mouse.
  • It automatically copies over styles, classes and data attributes from it's underlying select element.
  • The pop-up always attempts to make sure it appears on the screen; it will try not to cause any overflow.
  • It stays in sync with it's underlying <select /> element and preserves element IDs, so the correct information is sent when a POST occurs.

Development

How it's built

  • Built in a modular pattern with prototyping in mind.
  • The build process uses NodeJS and Jake to mash, minify and validate everything.
  • It has JSHint implemented, and has been written in strict mode.

How you can build it

If you've never built the project before, download nodejs.org, and make sure that you have the Node Packet Manager (NPM) installed (this usually comes bundled with Node).

Once that's done, you're going to need Jake. This is a Rake port for NodeJS. You can obtain this with NPM via the following command:

	$ npm install jake -g

Thereafter, build the solution from the [ProjectPath]\Build directory with the following command:

	$ jake

selectioner's People

Contributors

hrudham avatar

Watchers

James Cloos avatar  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.