N
N
ne_pes2018-02-28 16:20:56
JavaScript
ne_pes, 2018-02-28 16:20:56

How to implement this example in jquery?

it is necessary that the function is executed only when there is an indent from above 100px, for example
if(top>100){function(){
....}}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Pyrkin, 2018-02-28
@ne_pes

if($('html').scrollTop() > 100){
myfunction()
}

A
Anton, 2018-02-28
@Eridani

$(window).on('scroll', function() {
if($(this).scrollTop() > 100) {

}
})

Offhand, no errors

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question