Last active
August 29, 2015 14:26
-
-
Save asad01304/f0704b26e8309a9cb0e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PiiOptionPriceFix(){ | |
var KL = jQuery.noConflict(); | |
KL(".options-list .checkbox").each(function(){ | |
var $el = KL(this); | |
var defChecked = $el.data('defChecked'); | |
var isChecked = $el.attr("checked") ? "checked" : ""; | |
console.log(this.id, defChecked, isChecked, $el.is(":visible")); | |
if(typeof(defChecked) == "undefined") $el.data('defChecked', isChecked); | |
$el.is(":visible") ? $el.prop("checked", defChecked) : $el.prop("checked", ""); | |
}); | |
opConfig && opConfig.reloadPrice(); | |
} | |
var KL = jQuery.noConflict(); | |
KL("body").ready(function(){ | |
console.log("ON DOC LOAD") | |
PiiOptionPriceFix(); | |
}); | |
KL(window).ready(function(){ | |
console.log("ON WIND LOAD") | |
PiiOptionPriceFix(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function PiiOptionPriceFix(){ | |
var KL = jQuery.noConflict(); | |
KL(".options-list .checkbox").each(function(){ | |
var $el = KL(this); | |
if(!$el.is(":visible")){ | |
$el.attr("checked", false); | |
} | |
}); | |
opConfig && opConfig.reloadPrice(); | |
} | |
var KL = jQuery.noConflict(); | |
KL("body").ready(function() { | |
setTimeout(function(){ | |
PiiOptionPriceFix(); | |
},3000); | |
}); | |
/** Note: call this function PiiOptionPriceFix in on removepii function aswell */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment