Quantcast
Channel: Topic Tag: mobile | WordPress.org
Viewing all articles
Browse latest Browse all 22088

lukawoo on "[Theme: onetone] Problem with scroll"

$
0
0

I've removed the lines below from the jquery.smint.js, making my home header always fixed, and made the top margin of the .section-banner equal to .home-header height in css. Solved my scroll prob.

// if we scroll more than the navigation, change its position to fixed and add class 'fxd', otherwise change it back to absolute and remove the class
if (scrollTop > stickyTop) {
$('.smint').parents(".home-header").css({ 'position': 'fixed' }).addClass('fxd');
} else {
$('.smint').parents(".home-header").css({ 'position': 'relative'}).removeClass('fxd');
}
if(stickyTop>$('.smint').height()){
$('.smint').parents(".home-header").css({ 'position': 'fixed' }).addClass('fxd');
}


Viewing all articles
Browse latest Browse all 22088

Trending Articles