# b-blocks/2.1.5/build/skill-bar/view.js

bBlocks – Essential Gutenberg Blocks &amp; Patterns Collection, version 2.1.5. 1 lines.

- Page: https://pluginprobe.com/plugins/b-blocks/2.1.5/code/build/skill-bar/view.js
- Raw: https://pluginprobe.com/plugins/b-blocks/2.1.5/raw/build/skill-bar/view.js
- Modified: 2026-09-08T06:50:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/b-blocks/2.1.5/code/build/skill-bar/view.js#L10-L20`.

```javascript
(()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".wp-block-b-blocks-skill-bar");if(!e.length)return;const t=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&(e.target.classList.add("is-visible"),e.target.querySelectorAll(".b-blocks-skill-bar-skill-item").forEach((function(e){const t=parseInt(e.dataset.percentage,10),s=e.querySelector(".b-blocks-skill-bar-skill-bar-fill"),l=e.querySelector(".b-blocks-skill-bar-skill-circular-progress");if(s){e.style.setProperty("--b-blocks-skill-bar-skill-percentage",t+"%");const l=s.dataset.color;setTimeout((function(){s.style.width=t+"%",l&&(s.style.backgroundColor=l)}),100)}if(l){e.style.setProperty("--b-blocks-skill-bar-skill-percentage",t);const s=l.dataset.color,r=2*Math.PI*45*(1-t/100);setTimeout((function(){l.style.strokeDashoffset=r,s&&(l.style.stroke=s)}),100)}})),t.unobserve(e.target))}))}),{threshold:.2,rootMargin:"0px 0px -50px 0px"});e.forEach((function(e){t.observe(e)}))}))})();
```
