Posted By

philokezzar on 05/24/09


Tagged

ajax textmate


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mtelligent


ajax


 / Published in: jQuery
 

  1. Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.
  2. Code examples
  3.  
  4. Initialize a draggable with the axis option specified.
  5.  
  6. $('.selector').draggable({ axis: 'x' });
  7.  
  8. Get or set the axis option, after init.
  9.  
  10. //getter
  11. var axis = $('.selector').draggable('option', 'axis');
  12. //setter
  13. $('.selector').draggable('option', 'axis', 'x');
  14.  
  15.  

Report this snippet  

You need to login to post a comment.