Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Draggable" Drag vertical only?

I have this page that prompts you to drag it upwards to reveal the actual page. I want to know if there's any option so that you only can drag it vertically (Y-axis) i.e. "up". Is there any way to do this?

like image 211
ModernDesigner Avatar asked Dec 05 '22 13:12

ModernDesigner


1 Answers

Yes, this is possible.

$( "#draggable" ).draggable({ axis: "y" });

Check this: http://jqueryui.com/draggable/#constrain-movement

like image 136
techfoobar Avatar answered Dec 22 '22 00:12

techfoobar