• Stars
    star
    439
  • Rank 99,247 (Top 2 %)
  • Language
    JavaScript
  • Created almost 12 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert select box into switch

select-switch

Convert select box into switch. No need to move around your cursor :)

☞ Demo

This simply hides selectbox, so you can always reference to select element to retrieve value.

Installation

$ component install mnmly/select-switch

Example

var SelectSwitch = require('select-switch');

// Create the SelectSwitch with height of `50`
var selectSwitch = new SelectSwitch( $('select'), 50 );

// Return the value of selectbox
selectSwitch.value();

// Set the value of selectbox
selectSwitch.value( someOptionValue );

Todo

  • Need to cleanup the ever-growing labels at some intervals

License

(The MIT License)

Copyright (c) 2012 Hiroaki Yamane <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

ios7-switch

iOS7 Style Switch
CSS
81
star
2

minimal-counter

minimal counter
JavaScript
64
star
3

Swift-imgui

Dear ImGui Swift Wrapper API for macOS and iOS
Swift
64
star
4

sldr

Another minimal slider. Sldr — Just because default sliders are hard to touch and difficult to tweak.
JavaScript
51
star
5

express-livereload

Adds livereload functionality to express app to make development easier on express app without repetitive ⌘ + S
JavaScript
17
star
6

spring

Sometimes you want to use awesome Framer.js Spring Animation outside of Framer.
JavaScript
14
star
7

SceneKit-MeshLine

MeshLine for SceneKit
Swift
10
star
8

simplex-noise

Simplex Perlin Noise
JavaScript
8
star
9

monome-patatap

Monome owner? and love patatap.com by @jonobr1 and @lullatone?
JavaScript
7
star
10

builder-myth

myth plugin for builder2
JavaScript
5
star
11

ghWebSocket

WebSocket client for Grasshopper
C#
5
star
12

GhGLTF

glTF export component for Grasshopper
C#
5
star
13

boilerplate2

Personal boilerplate to get stuff ready for running, building scripts by `browserify`, and css by `myth`
JavaScript
4
star
14

boilerplate

Personal boilerplate.
JavaScript
4
star
15

reactive-modella

Reactive adapter for modella
JavaScript
4
star
16

slider

Really simple slider component
JavaScript
4
star
17

preloader

Web Worker based preloader
JavaScript
3
star
18

nike-plus-api

Unofficial Nike+ API client for node.js. Making it easy to access social-related APIs on Nike+ that are not documented on API docs yet.
JavaScript
3
star
19

d3-show-reel-in-coffee

Re-write of d3 demo reel in CoffeeScript
JavaScript
3
star
20

builder-coffee

CoffeeScript plugin for builder.js
3
star
21

blSyncGrasshopper

Blender add-on to communicate with Grasshopper
Python
2
star
22

scrollbar

JavaScript
2
star
23

simple-builder2-demo

Simple demo that uses plugins and builds as bundles.
JavaScript
2
star
24

throttled

Throttled scroll and resize event via requestAnimationFrame.
JavaScript
2
star
25

drag

Drag component
JavaScript
2
star
26

sfpc-seesaw

Seesaw app for SFPC final project.
JavaScript
1
star
27

libtinygltf

tinyglTF prepping for use in C#
C++
1
star
28

RhWebSocketServer

WebSocket server running alongside Rhino
C#
1
star
29

plot

JavaScript
1
star
30

FontPlusUtils

Utilities for webfont.fontplus.jp
CoffeeScript
1
star
31

ghAlembicComponent

Grasshopper Component for Alembic Export
C#
1
star
32

AE-Comp-Cloner

Clones comp + fill out the text layer based on the JSON entries
JavaScript
1
star
33

stylesheet

Thin wrapper for `StyleSheet`
JavaScript
1
star
34

vector-3d

Component version of 3D Vector class from lightgl.js
JavaScript
1
star
35

fake-box

Fake 3D Box
JavaScript
1
star
36

mini-slot.js

Small slot.
JavaScript
1
star
37

RhFilterSelection

RhinoCommand to filter current selection by object types
C#
1
star
38

measure-scrollbar

Measure scrollbar width
JavaScript
1
star
39

SCNProgramTestbed

hmm
Swift
1
star
40

constrain

Constrains a value to not exceed a maximum and minimum value. Ported from processing.js
JavaScript
1
star
41

ABriefRantOnTheFutureOfInteractionDesign-JP

Translation of ABriefRantOnTheFutureOfInteractionDesign in Japanese.
1
star
42

tag-cloud

tag cloud in Javascript
JavaScript
1
star
43

jquery.grayscale.js

small image grayscale plugin
JavaScript
1
star
44

o.mnmly.com

my simple blog.
JavaScript
1
star
45

vimconfig

personal vim stuff
Vim Script
1
star
46

link-sheet

Link sheet that behaves like the one in osx.
JavaScript
1
star
47

quick-prototype-server

quick mini server serving coffee ☞ js and stylus ☞ css.
JavaScript
1
star
48

MochaAsyncTask

A simple wrapper to allow CocoaScript to execute NSTask / Process asynchronously.
Swift
1
star
49

contacts-manager

Nettuts Contact Manager Tutorial Series re-written in CoffeeScript with require.js
PHP
1
star
50

mini-livereload

Really livereload server just for quick prototyping.
JavaScript
1
star
51

js2coffee-Apple-Service

A simple Apple Service to convert selected JavaScript lines to CoffeeScript to copy it onto Clipboard.
1
star
52

RhAutoCADBridge

Commands to bridge the gap between Rhinocerous and AutoCAD. Such as copy and paste between the apps.
C#
1
star
53

ext.isotope

A simple extension that adds a two-way translation on top of great library: isotope
CoffeeScript
1
star