timmywil / jquery.onoff Goto Github PK
View Code? Open in Web Editor NEWInteractive, accessible toggle switches for the web.
Home Page: http://timmywil.github.io/jquery.onoff/
License: MIT License
Interactive, accessible toggle switches for the web.
Home Page: http://timmywil.github.io/jquery.onoff/
License: MIT License
Hey, thanks at all for this cool thing,
my problem is followed. Every time I try to get a callback, the console gave me that issue:
Uncaught ReferenceError: $input is not defined
I did all that in the tut from Github, but doesnt work. In your example HTML-File also...
Hope you can help me as soon as possible.
Regards muuvmuuv
I tried the master version and the online sample. When I click the toggle, the checked
state does not change in HTML. I set $input.attr('checked', true)
, the toggle does not change either.
It would be nice to be able to disable the click toggle and have users be required to slide to change the value
Hi Timmy,
Is it possible change the values like true/false or I/O instead of on/off?
Hello Timmy,
It would be great if plugin provides callback on on/off of switch
Pramod
How can i add more onoff checkboxes on the same page ? When i click onoff checkboxes only the first one interacts.
Does this work with jquery 3.x? It has not been updated in few years
The generated html from http://proto.io/freebies/onoff/ is providing the following snippet:
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch">
<label class="onoffswitch-label" for="myonoffswitch">
<span class="onoffswitch-inner"></span>
<span class="onoffswitch-switch"></span>
</label>
</div>
where the correct one (also mentioned in your README) is:
<div class="onoffswitch">
<input type="checkbox" class="onoffswitch-checkbox" id="myonoffswitch" />
<label class="onoffswitch-label" for="myonoffswitch">
<div class="onoffswitch-inner"></div>
<div class="onoffswitch-switch"></div>
</label>
</div>
The difference is the div
instead of span
inside the label
that prevented the plugin to properly figure out how to render itself.
hi,i would like to ask if it's possible to use it inside jquery ui dialog?thanks
I have multiple checkboxes with the plugin enabled. I wanna do something like;
$(document).on('click', '#everything', function(){
$.ajax({
type: 'POST',
url: '/toggle-all',
complete: function() {
// toggle all to active state....
alert(' all checkboxes active in state');
$('.onoffswitch-checkbox').something();
}
});
});
Good initiative to write this plugin.
We are facing issue on iPad, when try to switch button from NO state to YES state. i.e. dragging handle left to right. Handle bounce back to left or does not move at all.
However http://timmywil.github.io/jquery.onoff/ example works fine on ipad.
Would please help me out whats going wrong.
Here Codepen : http://cdpn.io/obrna
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.