A simple, small and hopefully fast jquery plugin to turn an html list into columns. Originally created to work columns into
multi level menus. The plugins adds <ul>
's and <li>
's to breakdown the list into columns, as well as a limited number
of classes. (It does not add any css rules, you must supply your own css.)
http://xaviercas.github.io/lst2cols/
Vanilla: $('ul.my-list').lst2cols();
With options: $('ul.my-list').lst2cols({colNum:3, method:'lr'});
The plugin options are:
-
colNum
The number of column. Default is2
. -
method
The read direction top to bottomtb
or left to rightlr
. Default istb
. -
colClass
The class applied to columns. Default iscol
, -
colBlockClass
The class applied to container for columns. Default iscol-block
The MIT License (MIT)
Copyright (c) 2015 Xavier Castagné
For Brodie