Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - scroll event with scrollTop()

0 votes
2 views
added Aug 7 in jQuery by lccontrib Private (270 points)
if($(document).width() <= 783 ){
	var main_header_top = $('.header-layout-style-1').offset().top + 0;
	if($(this).scrollTop() > main_header_top) {
		$('.slider-position').addClass('stick-top top-zero').show();				
	} else {
		$('.slider-position').removeClass('stick-top top-zero');
	}
}

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...