divCloud

Re-discover WordPress. Get acquainted from level-one about the nuances of developing for Wordpress. Learn to code like a Pro with advanced Wordpress coding.

Dont forget to subscribe to our RSS Feeds for awesomeness.

iPhone-style Checkboxes

More Information

Ever wanted those flash iPhone on/off toggle switches on your webpage? Love jQuery? Well then I’ve got something special for you. iphone-style-checkboxes implements the iPhone toggles as replacements for standard HTML checkboxes

Elijah Miller is sharing the prototype version of this library with some additional features:

  • The initial version supported changing the ON/OFF label text; but if you made the text longer than a few characters, it would be hidden under the handle. UPDATE: The handle and label sizes are automatic based on the actual label text.
  • Support for dragging the control
  • Sliding labels (animated control change)

Usage

1
2
3
4
5
6
7
8
9
10
<head>
  <script src="jquery-1.4.js" type="text/javascript"></script>
  <script src="jquery/iphone-style-checkboxes.js" type="text/javascript"></script>
  <link rel="stylesheet" href="path_to/style.css" type="text/css" media="screen" />
  <script type="text/javascript">
    $(document).ready(function() {
      $(':checkbox').iphoneStyle();
    });
  </script>
</head>
Tags:
Advanced Tags: N.A

Was this post useful? Share on Twitter or Facebook and spread the love.   

Related Posts

Now What?

Comments to “Custom Form Elements: UI library for HTML form styling”

  1. August 21, 2011 at 3:47 pm

    Keep these actriles coming as they’ve opened many new doors for me.

Leave a Reply

Allowed Tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>