czottmann/little-shop-of-jquery-horrors
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A jQuery plugin or two. I don't know yet. jquery.sliceArray.js ==================== $.sliceArray( arr, n ); Splits an array [arr] into [n] slices, and returns a new array with [n] elements, each being a slice of the input array. Example: var arr = [ "a", "b", "c", "d", "e", "f", "g", "h", "i" ]; var sliced_2 = $.sliceArray( arr, 2 ); var sliced_3 = $.sliceArray( arr, 3 ); var sliced_4 = $.sliceArray( arr, 4 ); Results: sliced_2: [ [ "a", "b", "c", "d", "e" ], [ "f", "g", "h", "i" ] ] sliced_3: [ [ "a", "b", "c" ], [ "d", "e", "f" ], [ "g", "h", "i" ] ] sliced_4: [ [ "a", "b", "c" ], [ "d", "e", "f" ], [ "g", "h", "i" ], [ ] ]
About
A jQuery plugin or two. Like jquery.sliceArray.js, for example.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published