boazsender / mobilecheckbox

A simple CSS on/off toggle switch checkbox

Home Page:http://boazsender.github.com/mobilecheckbox/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mobilecheckbox

A simple CSS on/off toggle switch checkbox. Uses before and :checked psuedo selectors and the content property to make just a plain old simple <input type="checkbox"> look nice, provide greater affordance, and say "on" and "off". It looks like this:

example

tested on android 3.1 and iOS5.1.1 mobile safari

Getting Started

Download the production version or the development version.

In your web page:

<!doctype>
<html>
<head>
  <link rel="stylesheet" href="mobilecheckbox.css">
</head>
<body>
  <input type="checkbox">
</body>
</html>

Release History

  • v0.1.0-pre - 08/28/2012 - mobilecheckbox.css is pre release awaiting more mobile browser testing.

License

Copyright (c) 2012 Boaz Sender
Licensed under the MIT, GPL licenses.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Lint your code using grunt and grunt-css.

Important notes

Please don't edit files in the dist subdirectory as they are generated via grunt. You'll find source code in the src subdirectory!

Installing grunt

This assumes you have node.js and npm installed already.

  1. Test that grunt is installed globally by running grunt --version at the command-line.
  2. If grunt isn't installed globally, run npm install -g grunt to install the latest version. You may need to run sudo npm install -g grunt.
  3. From the root directory of this project, run npm install to install the project's dependencies.

About

A simple CSS on/off toggle switch checkbox

http://boazsender.github.com/mobilecheckbox/

License:MIT License


Languages

Language:JavaScript 100.0%