herbnookcottage.com
Discover the Magic of Plants
Uncover the beauty, science, and care of native plants with expert insights and practical tips.

About
Welcome to Herb Nook Cottage, your cozy corner for all things green and growing. Whether you’re a seasoned botanist, a curious gardener, or simply a nature enthusiast, we’re here to guide you through the wonders of native plants, plant care, and botany.
Our articles explore the intricate world of flora, offering expert knowledge, hands-on guidance, and fascinating insights into the plants that shape our landscapes.
Explore Our Categories
Stay In The Loop
Subscribe to our newsletter and never miss an update! Get the latest articles delivered straight to your inbox.
Latest Posts
var nav = document.querySelector('.fpc-carousel-navigation'); var prevBtn = nav.querySelector('.fpc-prev-btn'); var nextBtn = nav.querySelector('.fpc-next-btn'); nav.style.display = 'flex';
var slideWidth; var slidesToShow; var currentIndex = 0; var autoScrollInterval;
function updateDimensions() { slidesToShow = Math.max(1, Math.floor(wrapper.clientWidth / 300)); // Minimum width per slide slideWidth = wrapper.clientWidth / slidesToShow; // Adjust slide width slides.forEach(function (slide) { slide.style.width = slideWidth + 'px'; }); goToSlide(currentIndex); // Recalculate position }
function updateButtons() { prevBtn.disabled = currentIndex === 0; var maxIndex = slides.length - slidesToShow; nextBtn.disabled = currentIndex >= maxIndex; }
function goToSlide(index) { var maxIndex = slides.length - slidesToShow; if (index maxIndex) index = maxIndex; currentIndex = index; var offset = Math.round(slideWidth * currentIndex); wrapper.scrollTo({ left: offset, behavior: 'smooth' }); updateButtons(); }
function startAutoScroll() { clearInterval(autoScrollInterval); // Prevent multiple intervals autoScrollInterval = setInterval(function () { var maxIndex = slides.length - slidesToShow; if (currentIndex >= maxIndex) { goToSlide(0); // Restart from the beginning } else { goToSlide(currentIndex + 1); } }, 5000); // Scroll every 5 seconds }
function stopAutoScrollTemporarily() { clearInterval(autoScrollInterval); setTimeout(startAutoScroll, 10000); // Restart auto-scroll after 10 seconds of inactivity }
prevBtn.addEventListener('click', function () { goToSlide(currentIndex - 1); stopAutoScrollTemporarily(); });
nextBtn.addEventListener('click', function () { goToSlide(currentIndex + 1); stopAutoScrollTemporarily(); });
window.addEventListener('resize', updateDimensions);
updateDimensions(); startAutoScroll(); // Start auto-scrolling on page load });
