How to constrain jQuery draggable to both x and y axes -


it's pretty easy constrain jquery draggable axis this:

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

but how can constrain both x , y? iow, want allow both vertical , horizontal movement nothing else (imagine rooks on chess board).

just add works

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

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -