Code Monkey home page Code Monkey logo

iphoneswitch's Introduction

/******************************************************* 
*  jQuery iphoneSwitch plugin                          *
*                                                      *
*  jquery.iphoneSwitch.js                              *
*  Author: Ammon Casey                                 *
*  Website: http://www.brokenparadigmlabs.com          *
*  http://github.com/ammonkc/iPhoneSwitch              *
*  Twitter: @ammonkc                                   *
*  Date: 10.08.2013                                    *
*                                                      *
*  Copyright (c) 2010, Ammon Casey                     *
*  licensed under the MIT license:                     *
*  http://www.opensource.org/licenses/mit-license.php  *
********************************************************/

check the demo source for examples of how to use the plugin.
There are many options that can be passed via the 4th parameter

# define default settings
var settings = {
	mouse_over: 'pointer',
	mouse_out:  'default',
	hide_checkbox: true,
	sync_checkbox: true,
	use_images: true,
	speed: '300',
	on_label: 'On',
	off_label: 'Off',
	switch_height: 28,
	switch_width: 93,
	switch_radius: 3,
	track_img: 'images/switch_track.png',
	track_bg_color: '#5f6777',
	track_width: 93,
	track_height: 27,
	handle_img: 'images/switch_handle.png',
	handle_bg_color: '#f9f9f9',
	handle_border_color: '#d0d0d0',
	handle_height: 25,
	handle_width: 37,
	label_color: "#ffffff",
	label_font_size: 12
};

Change Log 0.10
    - added jQuery-1.10.2
    - updated jQuery(checkbox).attr to jQuery(checkbox).prop

Change Log 0.9
    - added jQuery-1.6.1
    - fixed slider state in new versions of jquery
    - made label text not selectable
    - changed cursor on handle and track/labels

iphoneswitch's People

Contributors

acasey avatar adammorris avatar ammonkc avatar

Watchers

 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.