text and image
Page: Homepage


Snippet Code
<style>
#shopify-section-template--23192150769857__vm_counter_iymeUQ {
padding-top: 30px;
padding-bottom: 30px;
}
.page-width {
max-width: 1430px;
padding-left: 15px;
padding-right: 15px;
margin: 0 auto;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .cstm-counter h2 {
font-size: 32px;
line-height: 40px;
text-align: center;
font-weight: 600;
margin: 0 0 40px;
letter-spacing: 0;
font-family: Poppins, sans-serif;
font-style: normal;
color: #000000;
word-break: break-word;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-inner {
display: flex;
align-items: center;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-left {
width: 100%;
max-width: 35%;
text-align: center;
display: flex;
flex-direction: column;
gap: 80px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block .loader span {
background-image: linear-gradient(121.84deg, #378552 13.8%, #eb7177 69.15%);
-webkit-text-fill-color: transparent;
font-weight: 600;
font-size: 100px;
line-height: 150px;
background-clip: text;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block h4 {
font-size: 28px;
line-height: 35px;
font-weight: 600;
margin: 0 0 10px;
font-family: Poppins, sans-serif;
font-style: normal;
color: #000000;
word-break: break-word;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block p {
font-size: 16px;
line-height: 24px;
font-weight: 400;
width: 100%;
max-width: 350px;
margin: 0 auto;
color: #000;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-center {
width: 100%;
max-width: 30%;
margin: 0 auto;
text-align: center;
}
[data-aos^=fade][data-aos^=fade].aos-animate {
opacity: 1;
transform: translateZ(0);
}
[data-aos][data-aos][data-aos-duration="500"] {
transition-duration: .5s;
}
body[data-aos-easing=ease] [data-aos] {
transition-timing-function: ease;
}
[data-aos^=fade][data-aos^=fade] {
transition-property: opacity, transform;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-center img {
width: 100%;
max-width: 200px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-right {
width: 100%;
max-width: 35%;
text-align: center;
display: flex;
flex-direction: column;
gap: 80px;
}
@media screen and (min-width: 750px) {
.page-width {
padding: 0 57.5px;
}
}
@media screen and (max-width: 749px) {
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-inner {
flex-direction: column;
gap: 30px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-left {
max-width: 100%;
gap: 20px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block .loader span {
font-size: 60px;
line-height: 70px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block h4 {
font-size: 20px;
line-height: 28px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-block p {
font-size: 14px;
line-height: 22px;
margin-bottom: 20px;
}
#shopify-section-template--23192150769857__vm_counter_iymeUQ .counter-right {
max-width: 100%;
gap: 20px;
}
}
</style>
<div id="shopify-section-template--23192150769857__vm_counter_iymeUQ" class="shopify-section">
<div class="page-width cstm-counter">
<h2>Treat the Root, Not Just the Pain – Say No to Piles.</h2>
<div class="counter-inner">
<!-- Left Column -->
<div class="counter-left">
<div class="counter-block">
<div class="loader">
<span class="count counter-loaded">70</span>
<span class="percen">%</span>
</div>
<h4>Digestive Issues</h4>
<p>Unmanaged digestive problems can lead to piles if the right diet and lifestyle changes aren’t made.</p>
</div>
<div class="counter-block">
<div class="loader">
<span class="count counter-loaded">80</span>
<span class="percen">%</span>
</div>
<h4>Piles Cases</h4>
<p>Most cases worsen over time, causing severe bleeding, unbearable pain, and even the need for surgery.</p>
</div>
</div>
<!-- Center Column -->
<div class="counter-center aos-init" data-aos="fade-up" data-aos-anchor-placement="top-center"
data-aos-duration="500">
<img
src="//jollypharmaindia.com/cdn/shop/files/Counter_231x732_2245e50c-a601-4442-9f7d-3aa6f68bfdfb.png?v=1739766211"
alt="">
</div>
<!-- Right Column -->
<div class="counter-right">
<div class="counter-block">
<div class="loader">
<span class="count counter-loaded">60</span>
<span class="percen">%</span>
</div>
<h4>Piles Surgeries</h4>
<p>A majority fail because the root cause isn’t treated, often requiring a second procedure.</p>
</div>
<div class="counter-block">
<div class="loader">
<span class="count counter-loaded">50</span>
<span class="percen">%</span>
</div>
<h4>Constipation Risk</h4>
<p>Ignoring constipation increases your chances of developing piles significantly.</p>
</div>
</div>
</div>
</div>
<script>
$(window).on('load', function () {
var target = $('#shopify-section-template--23192150769857__vm_counter_iymeUQ');
if (target.length === 0) return; // Ensure the section exists
if ('IntersectionObserver' in window) {
let observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
animateCounter();
observer.disconnect(); // Run only once
}
});
}, { threshold: 0.2, rootMargin: "0px 0px -20% 0px" }); // Adjust for mobile
observer.observe(target[0]);
} else {
// Fallback for older browsers
$(window).on('scroll resize', function () {
if (isInViewport(target)) {
animateCounter();
$(window).off('scroll resize'); // Run only once
}
});
}
function isInViewport(element) {
if (element.length === 0) return false;
let rect = element[0].getBoundingClientRect();
return rect.top < window.innerHeight * 0.9 && rect.bottom > 0;
}
function animateCounter() {
target.find('.count').each(function () {
var size = $(this).text().split(".")[1] ? $(this).text().split(".")[1].length : 0;
$(this).prop('Counter', 0).animate({
Counter: $(this).text()
}, {
duration: 5000,
step: function (func) {
$(this).text(parseFloat(func).toFixed(size));
}
});
});
}
});
</script>
</div>