PluginProbe
Qi Blocks / 1.0.7
Qi Blocks v1.0.7
1.5.3 1.5.2 1.5.1 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 All 45 releases
qi-blocks / assets / dist / cards-gallery-script.js

cards-gallery-script.js in Qi Blocks 1.0.7, at assets/dist/cards-gallery-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 !function(){"use strict";var t={n:function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,{a:e}),e},d:function(n,e){for(var i in e)t.o(e,i)&&!t.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:e[i]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)}},n=jQuery,e=t.n(n);document.addEventListener("DOMContentLoaded",(function(){i.init()}));const i={init:function(){this.holder=document.querySelectorAll(".qi-block-cards-gallery"),this.holder.length&&[...this.holder].map((t=>{i.initItem(t)}))},initItem:function(t){if(!t)return;let n,i=(t=e()(t)).find(".qodef-m-card"),o=t.data("orientation");switch(o){case"left":n="0 0 0 20%";break;case"right":n="0 20% 0 0"}e()(i.get().reverse()).each((function(){const r=e()(this);r.on("click",(function(){if(!i.last().is(r))return"both"===o&&(n=r.index()%2?"0 0 0 20%":"0 0 0 -20%"),r.addClass("qodef-out").animate({margin:n},200,"swing",(function(){r.detach(),r.insertAfter(i.last()).animate({margin:"0"},200,"swing",(function(){r.removeClass("qodef-out")})),i=t.find(".qodef-m-card")})),!1}))}))}}}();