Great plugin!!
This does almost what I wanted only one little thing...

At the moment when you have this list: <ul class="list_splitted">
After the plugin is attached this is the HTML

<div class="list_splitted">
<ul>
</ul>
</div>

I wished my unordered list still had the same class because than is
easier to style with/without js. It then will look always the same.


> I wrote a plugin that does this. It's completely undocumented, because  
> I just wrote it for a friend, but the basic usage would be:
>
> $('ul.list_splitted').columns({columns: 2});
>
> You can see a demo here:
>
> http://plugins.learningjquery.com/columns/
>
> View source to see what the lists look like before they're columnized.
>
> The plugin code is here:
>
> http://plugins.learningjquery.com/columns/jquery.columns.js
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Nov 7, 2008, at 4:24 PM, IschaGast wrote:
>
>
>
> > Hi,
>
> > I am trying to figure out how I can split a simple unordered list in
> > two unordered lists.
>
> > Code:
> >            <ul class="list_splitted">
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >                    <li>list item 01</li>
> >            </ul>
>
> > I can create a div around it and two columns inside it with this code:
>
> > jQuery(function($) {
> >            $('.list_splitted').wrap('<div class="columns"><div  
> > class="column"></
> > div><div class="column"></div></div>')
> >    });
>
> > But now I have to grab half of the list items and place one half
> > inside one column and the rest inside another column. I tried to get
> > the length of it with:
>
> > $('.list_splitted li').length;
>
> > But then? I really don't know. I this something that could be easily
> > fixed with jQuery. I tried to find some sample code in the internet
> > but didn't find it.
>
> > I really hope someone could help... because that would make it a lot
> > easier for backend coding.

Reply via email to