brynm / icheckbox Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/icheckbox
Automatically exported from code.google.com/p/icheckbox
What steps will reproduce the problem?
1. Use IE 7 or 8
2. Use JQuery 1.4.4
3. Animate check on or off
What is the expected output? What do you see instead?
IE should display the checkboxes appropriately but instead Jquery throws an
invalid argument exception.
What version of the product are you using? On what operating system?
This occurs in IE version < 9
Please provide any additional information below.
The plugin attempts to set a css property that does not exist in earlier
versions of IE, backgroundPosition. These earlier versions however do have
backgroundPositionX and backgroundPositionY. Changing the on/off callback
functions to the following corrects the issue in all tested browsers:
iCheckOff: function (elem , atime, animOnly) {
atime = typeof(atime) == 'number' ? atime : settings.switch_speed;
animOnly = animOnly== true ? true : false;
atime = parseInt(atime) > 0 ? atime : 1;
if ( animOnly == true ) {
jQuery(elem).animate({backgroundPositionX: settings.switch_swing+'px', backgroundPositionY: '0px'}, atime, 'linear');
} else {
jQuery(elem).animate({backgroundPositionX: settings.switch_swing+'px', backgroundPositionY: '0px'}, atime, 'linear', function() {
var cB = jQuery(jQuery(this).parent()).find('input');
jQuery(cB).removeAttr('checked');
jQuery(cB).change();
});
}
},
// animate on function
iCheckOn: function (elem, atime, animOnly) {
atime = typeof(atime) == 'number' ? atime : settings.switch_speed;
atime = parseInt(atime) > 0 ? atime : 1;
if ( animOnly == true ) {
jQuery(elem).animate({backgroundPositionX: '0px', backgroundPositionY: '0px'}, atime, 'linear');
} else {
jQuery(elem).animate({backgroundPositionX: '0px', backgroundPositionY: '0px'}, atime, 'linear', function() {
var cB = jQuery(jQuery(this).parent()).find('input');
jQuery(cB).attr('checked', 'checked');
jQuery(cB).change();
});
}
}
Original issue reported on code.google.com by [email protected]
on 17 Feb 2011 at 4:34
Please explain how the new feature would appear to an end-user:
A disabled checkbox should support having a different look and style that can
be defined via CSS
by the developer.
As a bonus, perhaps the end user is greeted with a dialog or other feedback for
attempting to use
a disabled control.
Please explain how the feature should be implemented in the JS source:
This requires:
1. A new optional style and the appropriate settings. This MUST be optional and
should have
some default that leverages the existing settings (perhaps an opacity change to
denote "disabled"
or something similar.
2. Code to support detection and use of a "disabled" state.
3. A set of defaults that get overridden by the developer when they choose to
implement the
state themselves.
If you have a code sample for the feature or have a diff of it being
implemented, please include it:
Original issue reported on code.google.com by badmonkey0001
on 21 May 2010 at 11:24
The demo page loads the jquery.iphone-switch.js from Daniel LaBare. Yet, it is
never used while giving the impression that it is necessary for the iCheckbox
plugin to work. As far as I see it, it is not.
Only a slight inconvenience but I'd remove that JS file.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2011 at 9:07
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.