leo-naeka edited this page Jan 13, 2012 · 3 revisions

Summary

Use

Simple use

$(":checkbox").switchbutton();

Advanced use

$(":checkbox").switchbutton({
   
    classes: 'ui-switchbutton-thin',
   
    duration: 300,
   
    checkedLabel: 'I',
   
    uncheckedLabel: 'O'
   
});

Browsers compatibility

jquery-switchbutton browsers compatibility

You may have noticed that even if css border-radius is supported on IE9, the background is not stripped and covers the whole original square (more visible with ios5 style).

To prevent this visual glitch, you should include in your HTML:

<!--[if gte IE 9]>
  <style type="text/css">
    .ui-switchbutton-default .ui-switchbutton-handle {
       border-radius: 0px;
    }
  </style>
<![endif]-->
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.