PluginProbe
Additional Terms Lite for WooCommerce / 1.5.0
Additional Terms Lite for WooCommerce v1.5.0
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / assets / js / minified / script.js

script.js in Additional Terms Lite for WooCommerce 1.5.0, at assets/js/minified/script.js

1 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";(function($){"use strict";var wat={cache:function cache(){this.vars={};this.els={};this.vars.selector="woo-additional-terms";this.vars.embed="".concat(this.vars.selector,"__link");this.vars.content="".concat(wat.vars.selector,"__content");this.vars.openClassName="".concat(this.vars.selector,"__link--open");this.vars.closeClassName="".concat(this.vars.selector,"__link--closed");this.vars.wrapper=".woocommerce-terms-and-conditions-wrapper.".concat(this.vars.selector)},init:function init(){this.cache();this.events()},events:function events(){$(document.body).on("click","a.".concat(this.vars.embed),this.handleEmbedToggle)},handleEmbedToggle:function handleEmbedToggle(event){event.preventDefault();var $this=$(this);var $wrapper=$this.closest(wat.vars.wrapper);var $content=$wrapper.find(".".concat(wat.vars.content));if($wrapper.length){$content.slideToggle(function(){if($content.is(":visible")){$this.addClass(wat.vars.openClassName);$this.removeClass(wat.vars.closeClassName)}else{$this.removeClass(wat.vars.openClassName);$this.addClass(wat.vars.closeClassName)}});return false}}};wat.init()})(jQuery);