leafo / sticky-kit

A jQuery plugin for creating smart sticky elements

Home Page:http://leafo.net/sticky-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sticky kit destroy on top

janmense opened this issue · comments

hey there,

my header sticks to the top of the page if i scroll down. stickykit adds the .is_stuck class correctly if i scroll, but it dont destroy if scroll back to top.

the code:
$(".header").stick_in_parent();

i tried this:

$(".header").stick_in_parent();
    if ($(this).scrollTop() === 0){  
		$('.header').removeClass("is_stuck");
	}

but this doesnt work.

can somebody help me with that?