Hello,
I attempt to use draggable for one of my project, as you see here it works fine but not fluid, i want tween effect when i drag element.
Draggable.create(".item", {
type: "x",
edgeResistance: 0.65,
bounds: ".frises-items",
//lockAxis:true,
throwProps: true,
onDrag: function() {
pos = parseInt(this.x);
if (pos < 0) {
$('.slick-prev').show()
} else {
$('.slick-prev').hide()
}
},
onDragEnd: function() {
reference = 10880;
pos = parseInt(this.x);
if (Math.abs(pos) == reference) {
$('.slick-next').hide()
} else if (Math.abs(pos) < reference) {
$('.slick-next').show()
}
}
});
Draggable.get(".item").enable();
Do you have an idea please?
Thank you