Comments (9)
This scheme was replaced in version 0.8, because of the bugs related to customized inputs inside labels and different way of handling key events in some browsers.
return false
also prevents an infinite loops in some cases.
Since iCheck is used for customization, I hope we don't need to fire direct clicks on an inputs.
I would like to add a toggle
method instead, which would work like an ordinary click:
$('input').iCheck('toggle');
:checkbox checked => uncheck
:checkbox unchecked => check
:radio checked => do nothing
:radio unchecked => check current, uncheck others
from icheck.
Yes. But the goal of plugin like icheck is to make the input more
beautiful. And it will be easy to add un any project. And all the normal
évent attached to the original input must be preserved.
For example, in ASP.net we can easyly make a submit of thé form when thé
checkbox state change... This possibility is triggered by the click
évent... With icheck this never happened.
In the same way, original event on chzckbox could be executed by thé icheck
no ?
from icheck.
iCheck doesn't use click event to make changes, it works directly with input's state instead.
I hope ASP.NET can handle ifChanged
callback. It has almost the same effect, as a click event.
This code:
$('input').click(function(){
// submit
});
Should be replaced with:
$('input').on('ifChanged', function(){
// submit
});
from icheck.
I've added a toggle
method. It can be used instead of the click event. To handle clicks, use ifClicked
callback.
f5da1d7
from icheck.
Next version will support click handler on inputs.
from icheck.
Not sure if it's linked. But how come when I click a checkbox it doesn't toggle the actual checkbox state (ie from checked to unchecked) when I look at the source code?
Here is my setup:
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
$('input').on('ifChanged', function(event){
alert(123);
});
But nothing happens.
from icheck.
Hi this is working for me fine
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
$('input').iCheck('update');
$('input ').on('ifClicked ', function(event) {
if ($('input').prop('checked')) {
alert('1');
} else {
alert('2');
});
from icheck.
Thanks for the super fast feedback.
I just added your code to my site...and it doesn't work. The checkboxes are nice and sexy, but no alerts on click...Might be collision with a script...hummm.
from icheck.
Hi, @desduvauchelle I have your problem with iCheck,
$('input').on('ifChanged', function(event){
alert(123);
});
No work. How did you fix it?
Thanks
from icheck.
Related Issues (20)
- it can not be aligned horizontally in a td of table. HOT 1
- Not working with asp radiobuttonlist HOT 2
- iCheck disabled checked HOT 1
- Problems with ios 13 HOT 7
- Problem when going back then forward. HOT 2
- Mac Safari iCheck won't render HOT 4
- IPAD icheck- checkbox not working HOT 3
- iCheck library not compatible with JAWS screen reader for accessibility HOT 2
- checking checked state of check box gives flipped result HOT 1
- v1.0.3 not available on yarn install HOT 1
- Getting issues on touch screens with v1.0.3 HOT 1
- Custom data elements HOT 1
- iCheck is causing div collapse
- disable icheck in readonly
- iCheck in not working in Flutter - Android webviews HOT 1
- Docs website is down
- Checkbox does not work on mobile with Desktop Site mode HOT 4
- Icheck not working on mobile chrome that uses desktop site view enabled
- [Composer\Downloader\TransportException] file could not be downloaded, got redirect without Location (HTTP/1.1 300 Multiple Choices) HOT 18
- skins have invalid CSS that breaks the width of the iCheck
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icheck.