<script>
var isScrolledIntoView = function(elem) {
var $elem = jQuery(elem);
var $window = jQuery(window);
var docViewTop = $window.scrollTop();
var docViewBottom = docViewTop + $window.height();
var elemTop = $elem.offset().top;
var elemBottom = elemTop + $elem.height();
return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
}
function hidestickybarwhenfootershow(){
jQuery(document).scroll(function() {
if(isScrolledIntoView('.shopify-section-group-footer-group')){
if(jQuery('#great_sticky_bar').length > 0){
jQuery('#great_sticky_bar').css('visibility','hidden');
}
}else{
if(jQuery('#great_sticky_bar').length > 0){
jQuery('#great_sticky_bar').css('visibility','visible');
}
}
});
}
var checkjqueryinterval = setInterval(checkjquery, 500);
function checkjquery(){
if (typeof jQuery == 'undefined') {
} else {
clearInterval(checkjqueryinterval);
hidestickybarwhenfootershow();
}
}
</script>
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Thursday, 28 September 2023
When Scroll to footer Sticky bar hide
Subscribe to:
Posts (Atom)