File "yith-date-format.min.js"
Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/yith-woocommerce-compare/plugin-fw/assets/js/yith-date-format.min.js
File size: 1.09 KB
MIME-type: text/plain
Charset: utf-8
jQuery(function(t){t(document).on("click",".yith-plugin-fw-date-format__option",function(){var a=t(this),i=a.closest(".yith-plugin-fw-date-format");i.find(".example").text(a.data("preview")),i.find(".yith-date-format-custom").val(a.val())}),t(document).on("click input",".yith-date-format-custom",function(){t(this).closest(".yith-plugin-fw-radio__row").find("input[type=radio]").prop("checked",!0)}),t(document).on("input yith-date-format-change",".yith-date-format-custom",function(){var a=t(this),i=a.closest(".yith-plugin-fw-date-format"),e=i.data("format"),o=i.data("js"),n=i.data("current"),r=i.find(".example"),f=i.find(".spinner");if("yes"===o){var d=new Date(n);d=t.datepicker.formatDate(a.val(),d),r.text(d)}else clearTimeout(t.data(this,"timer")),a.data("timer",setTimeout(function(){if(a.val()){f.addClass("is-active");var i={action:e+"_format",date:a.val()};t.post(ajaxurl,i,function(t){f.removeClass("is-active"),r.text(t)})}},500))}),t(document).on("yith-plugin-fw-date-format-init",function(){t(".yith-date-format-custom").trigger("yith-date-format-change")}).trigger("yith-plugin-fw-date-format-init")});