File "by_instock.js"
Full Path: /home/vantageo/public_html/cache/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce-products-filter/ext/by_instock/js/by_instock.js
File size: 1.57 KB
MIME-type: text/plain
Charset: utf-8
"use strict";
function woof_init_instock() {
if (icheck_skin != 'none') {
jQuery('.woof_checkbox_instock').iCheck({
checkboxClass: 'icheckbox_' + icheck_skin.skin + '-' + icheck_skin.color,
});
jQuery('.woof_checkbox_instock').on('ifChecked', function (event) {
jQuery(this).attr("checked", true);
woof_current_values.stock = 'instock';
woof_ajax_page_num = 1;
if (woof_autosubmit) {
woof_submit_link(woof_get_submit_link());
}
});
jQuery('.woof_checkbox_instock').on('ifUnchecked', function (event) {
jQuery(this).attr("checked", false);
delete woof_current_values.stock;
woof_ajax_page_num = 1;
if (woof_autosubmit) {
woof_submit_link(woof_get_submit_link());
}
});
} else {
jQuery('.woof_checkbox_instock').on('change', function (event) {
if (jQuery(this).is(':checked')) {
jQuery(this).attr("checked", true);
woof_current_values.stock = 'instock';
woof_ajax_page_num = 1;
if (woof_autosubmit) {
woof_submit_link(woof_get_submit_link());
}
} else {
jQuery(this).attr("checked", false);
delete woof_current_values.stock;
woof_ajax_page_num = 1;
if (woof_autosubmit) {
woof_submit_link(woof_get_submit_link());
}
}
});
}
}