';
}
function init() { document.querySelectorAll('[data-af-cs]:not([data-ready])').forEach(render); }
init();
if (window.afCsBound) return;
window.afCsBound = true;
function setOpen(root, open) {
if (open) {
root.classList.remove('af-cs--left');
if (root.querySelector('.af-cs__menu').getBoundingClientRect().left < 16) root.classList.add('af-cs--left');
}
root.classList.toggle('is-open', open);
root.querySelector('.af-cs__btn').setAttribute('aria-expanded', open);
}
function closeOthers(target) {
document.querySelectorAll('.af-cs.is-open').forEach(function (root) {
if (!root.contains(target)) setOpen(root, false);
});
}
document.addEventListener('click', function (e) {
closeOthers(e.target);
var btn = e.target.closest && e.target.closest('.af-cs__btn');
if (btn) {
var root = btn.closest('.af-cs');
setOpen(root, !root.classList.contains('is-open'));
}
});
document.addEventListener('focusin', function (e) { closeOthers(e.target); });
document.addEventListener('keydown', function (e) {
if (e.key !== 'Escape') return;
document.querySelectorAll('.af-cs.is-open').forEach(function (root) {
var hadFocus = root.contains(document.activeElement);
setOpen(root, false);
if (hadFocus) root.querySelector('.af-cs__btn').focus();
});
});
if (window.jQuery) window.jQuery(document).on('elementor/popup/show', init);
})();
Events
Our upcoming Events and Workshops.
At Advantage Feeders Field Days, you can explore our products firsthand and speak with our expert team about your livestock operation. Discover how Advantage Feeders can help improve feeding efficiency, reduce feed waste and boost profitability on your farm or ranch.
Check back soon for upcoming field days and demonstrations!