Giter VIP home page Giter VIP logo

icheckbox's People

Watchers

 avatar

icheckbox's Issues

iCheckbox jQuery animate calls not compatible with IE versions < 9

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

Unnessecary JS library in demo

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

Implement a "disabled" state

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.