Hi,
I have object (div-box), and it's draggable (I'm using jQuery). How I can get information which direction it has moved a visitor? Example: User drag it to left down and I wanna know it, how?
P.S.: Sorry for my English
Hi,
I have object (div-box), and it's draggable (I'm using jQuery). How I can get information which direction it has moved a visitor? Example: User drag it to left down and I wanna know it, how?
P.S.: Sorry for my English
how about this?
var start,stop;
$("#draggable2").draggable({
axis: "x",
start: function(event, ui) {
start = ui.position.left;
},
stop: function(event, ui) {
stop = ui.position.left;
alert('has moved ' + ((start < stop) ? 'rigth':'left'))
}
});