diff --git a/How-does-it-work.md b/How-does-it-work.md new file mode 100644 index 0000000..66786da --- /dev/null +++ b/How-does-it-work.md @@ -0,0 +1,16 @@ +# Importing selectableScroll + +1. Import jQuery/jQuery-ui in the `` tag first, then the plugin. +2. If you want to use the modified selector lasso (sides disappearing when scrolling out of viewport), import the `jquery-ui-ext.css` after jQuery ui's own css file. + +# Initializing selectableScroll on the container + +3. Initialize the selectable on the parent container of selectables (which is mostly a scrollable div). Options are the same to the original ui-selectable, extended with these (copied from source): +``` +scrollSnapX: 5, // When the selection is that pixels near to the top/bottom edges, start to scroll +scrollSnapY: 5, // When the selection is that pixels near to the side edges, start to scroll +scrollAmount: 25, // In pixels +scrollIntervalTime: 100 // In milliseconds +``` + +4. Profit! \ No newline at end of file