H
H
Human2015-09-29 12:09:15
css
Human, 2015-09-29 12:09:15

How to make the block appear smoothly when scrolling down (for example 300px)?

Hello.
You need to make it so that when you scroll down the page about 300px down, a block appears at the bottom of the page and is immediately fixed there (right: 30px; bottom: 30px;)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Pyrkin, 2015-09-29
@khlopchyna

$(window).scroll(function(){
if($(window).scrollTop()>300){
$('#elem').show()
}

})

#elem{
display:none;
position:fixed;
right:30px;
bottom:30px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question