Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
1–10 of 18 posts
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#2Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#3It's nice to see something like this as a jQuery plugin. It would be amazing if they could be adjusted by swiping on mobile!
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#4It's nice to see something like this as a jQuery plugin. It would be amazing if they could be adjusted by swiping on mobile!
I don't know about Android but you don't swipe toggle buttons on iOS.
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#5 var settings = $.extend({
dragable: true,
clickable: true,
ontext: 'ON',
offtext: 'OFF',
on: true,
animtime: 300
}, opts);
The $.extend method still returns a suitable object even if `opts` is undefined.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
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#6One 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.
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#7Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#8Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#9I like these, but how do you get the "value"? Im not a javascript guru, but is there an attribute or value I need to check?
Re: Show HN: Easily Customizable Toggle Buttons - jQuery Plugin
#10These look great! Thanks for sharing. 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.