Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // You need HTML + CSS too, this alone doesn't work!
- $(function(){
- $(window.scroll(function(){
- var distanceTop = $('#footer').offset().top - $(window).height();
- if($window).scrollTop() > distanceTop)
- $('#cta').animate({'right':'0px'}, 300);
- else
- $('#cta').stop(true).animate({'right':'-300px'},100);
- }))
- });
- $('#cta .btn-close').bind('click',function(){
- $(this).parent().remove();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement