PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 4.0.0
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v4.0.0
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / assets / js / dynamic-blocks / progress-bar.js
superb-blocks / assets / js / dynamic-blocks Last commit date
accordion.js 2 months ago add-to-cart.js 2 months ago animated-heading.js 2 months ago block-animations.js 2 months ago carousel.js 2 months ago count-animations.js 2 months ago countdown.js 2 months ago form.js 2 months ago popup.js 2 months ago progress-bar.js 2 months ago reveal-button.js 2 months ago sticky.js 2 months ago table-of-contents-smooth-scroll.js 2 months ago typing-animations.js 2 months ago
progress-bar.js
1 lines
1 (()=>{function e(e){var t="true"===e.getAttribute("data-animate"),r=parseInt(e.getAttribute("data-duration"),10)||1500,i=parseInt(e.getAttribute("data-value"),10)||0,a=parseInt(e.getAttribute("data-goal"),10)||100,s=e.getAttribute("data-value-display")||"value",n="false"!==e.getAttribute("data-show-percentage"),o=e.getAttribute("data-prefix")||"",l=e.getAttribute("data-suffix")||"",u=a>0?Math.min(100,i/a*100):0;function d(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}var c=e.className||"",f=-1!==c.indexOf("is-style-circle")||-1!==c.indexOf("is-style-glow-circle"),g=-1!==c.indexOf("is-style-semicircle")||-1!==c.indexOf("is-style-glow-semicircle"),b=!f&&!g,v=e.querySelector(".superb-progress-fill"),p=e.querySelector(".superb-progress-fill-circle"),y=e.querySelectorAll(".superb-progress-percentage"),h=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function m(){if(b&&v&&(v.style.transition="width "+r+"ms ease-out",v.style.width=u+"%"),(f||g)&&p){var e=parseFloat(p.getAttribute("data-target-offset"));p.style.transition="stroke-dashoffset "+r+"ms ease-out",p.style.strokeDashoffset=e}!function(){if(!n||0===y.length)return;var e=null;function t(a){null===e&&(e=a);var s=a-e,n=Math.min(s/r,1),o=1-Math.pow(1-n,3);w(Math.round(o*i)),n<1?requestAnimationFrame(t):w(i)}requestAnimationFrame(t)}()}function w(e){if(n){var t,r=d(e);t="valueGoal"===s?o+r+" / "+o+d(a)+l:o+r+l;for(var i=0;i<y.length;i++)y[i].textContent=t}}if(!t||h)return function(){if(b&&v&&(v.style.transition="none",v.style.width=u+"%"),(f||g)&&p){var e=parseFloat(p.getAttribute("data-target-offset"));p.style.transition="none",p.style.strokeDashoffset=e}w(i)}(),void(e.style.visibility="visible");if("IntersectionObserver"in window){var A=new IntersectionObserver((function(e){for(var t=0;t<e.length;t++)if(e[t].isIntersecting){A.disconnect(),m();break}}),{threshold:.2});A.observe(e)}else m();e.style.visibility="visible"}document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".wp-block-superb-addons-progress-bar").forEach(e)}))})();