T
T
The Dragger2015-04-03 11:25:21
JavaScript
The Dragger, 2015-04-03 11:25:21

Which image upload for Yii would you recommend?

What image upload do you use and on which yii?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Ruslan., 2018-03-04
@yankoyski

If you assign a value to tempScrollTop before comparing to currentScrollTop , then you replace the previous value in tempScrollTop with currentScrollTop and your subsequent checks fail because the variables are now equal.

A
Andrew, 2018-03-04
@KickeRockK

Read more about if's to avoid such questions.
If the assignment (equating) of variables at the top:
You have them equal by default at any moment of the scroll, there is no entry into if.
As I understand it, you want to display "up" and down - "down" when scrolling up, on each scroll?
To do this, you need to save the previous position and compare with it (initially it should be at zero).

var tempScrollTop=0,
 currentScrollTop;
$(window).scroll(function(){
    currentScrollTop = $(window).scrollTop();
    if (tempScrollTop < currentScrollTop ){
        alert("Вниз");
    }
    else if (tempScrollTop > currentScrollTop ) {
        alert("Вверх");
    }
     tempScrollTop = currentScrollTop;
});

P
Papa, 2015-04-03
@IPD2

dropzonejs
on both

A
Alexey Pavlov, 2015-04-05
@joseperez

Xupload for yii

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question