Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

jackfranklin/jQuery-Split-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple plugin to split a list into two at the half way point. 

To use, just call it on the list you wish to split into two, eg:
$("#myBigList").splitList();

If you want you can pass a string into the splitList() function which will be the name of the class applied to both the new lists created like so:
$("#myBigList").splitList("smallerList");
This is an optional feature.

It will insert two unordered lists after #myBigList, the first list containing the first half of the items in the original list, the second list containing the second half. The initial list is then removed from the DOM.

If you wish to understand the code, check out jquery.splitlist.commented.js, it's the same code just fully commented to help you out.

Any questions or feature requests, ask @Jack_Franklin on Twitter.

About

Splits lists in half

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published