-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function Switchery.prototype.setPosition is not Compatible with IE11 Browser. #161
Comments
@abpetkov Kindly help. |
this.element.checked is not working. |
@abpetkov Kindly Help. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Function Switchery.prototype.setPosition is not Compatible with IE Browser but its working fine with other browsers. Kindly help.
Example Calling:
Switchery.prototype.bindClick = function() {
var parent = this.element.parentNode.tagName.toLowerCase()
, labelParent = (parent === 'label') ? false : true;
this.setPosition(labelParent);
this.handleOnchange(this.element.checked);
};
Switchery.Js file and Below method.
Switchery.prototype.setPosition = function (clicked) {
debugger;
var checked = this.isChecked()
, switcher = this.switcher
, jack = this.jack;
if (clicked && checked) checked = false;
else if (clicked && !checked) checked = true;
if (checked === true) {
this.element.checked = true;
} else {
jack.style.left = 0;
this.element.checked = false;
this.switcher.style.boxShadow = 'inset 0 0 0 0 ' + this.options.secondaryColor;
this.switcher.style.borderColor = this.options.secondaryColor;
this.switcher.style.backgroundColor = (this.options.secondaryColor !== defaults.secondaryColor) ? this.options.secondaryColor : '#fff';
this.jack.style.backgroundColor = (this.options.jackSecondaryColor !== this.options.jackColor) ? this.options.jackSecondaryColor : this.options.jackColor;
this.setSpeed();
}
};
The text was updated successfully, but these errors were encountered: