Hey guys, I did something similar but based off the styles of the jQuery UI slider plugin. I found while these types of standalone plugins looked okay, they were frustrating to customise or even to make them look PERFECT.
This looks great! One minor suggestion: make the toggle button non selectable for dragging. http://jsfiddle.net/SWqw3/ show's a basic way of doing this.
One thing - I know the intent is that they can be easily customized, but it might be nice to have smaller options out of the box. I think I've been spoiled by Twitter Bootstrap, though, where they have a few preset sizes. My first thought was that they looked a little large.
It looks like the primary function of the button is to alter something on the page via the toggles function, but I guess you could check if it had the active class or not.
[+] [-] alexyoung|13 years ago|reply
You also might want to `return this.each` so calls can be chained.
All of this is covered here: http://docs.jquery.com/Plugins/Authoring
[+] [-] simontabor|13 years ago|reply
[+] [-] taitems|13 years ago|reply
Check it out here: http://taitems.github.com/UX-Lab/ToggleSwitch/index.html
I also investigated achieving something similar using only CSS base on a :checkbox, but the browser support, even in "modern" browsers was poor: http://taitems.github.com/UX-Lab/CSSInputs/index.html
Thoughts and hacks on the above, here: http://taitems.tumblr.com/post/23099016111/css3-input-stylin...
[+] [-] axiak|13 years ago|reply
[+] [-] simontabor|13 years ago|reply
[+] [-] creativename|13 years ago|reply
One thing - I know the intent is that they can be easily customized, but it might be nice to have smaller options out of the box. I think I've been spoiled by Twitter Bootstrap, though, where they have a few preset sizes. My first thought was that they looked a little large.
[+] [-] simontabor|13 years ago|reply
[+] [-] tehwebguy|13 years ago|reply
[+] [-] rane|13 years ago|reply
[+] [-] S_A_P|13 years ago|reply
[+] [-] wbobeirne|13 years ago|reply
[+] [-] antihero|13 years ago|reply
[+] [-] munkydung|13 years ago|reply
[+] [-] simontabor|13 years ago|reply