after dragging up, animate viewport up and after dragging down, animate viewport down...
- by Luis
I been trying to make this work for the last couple of days, I'm a new into web designing so I hope someone can help me out with this. I'm trying to run an animation after dragging the div container depending if the user is dragging up or down. This is the code that Im working on.
this is the code when calling the jquery widget
$ $('#container').draggable({scroll:true, axis: 'y', //scrollSensitivity: 1000,
stop: function(event, ui) {
if(scrollY <= 0){
$('#container').animate({
top: '-2000px'
}, 500);
}
if(scrollY -= 0){
$('#container').animate({
top: '0'
}, 500);
}
}
});