Oversteer
Oversteer

Reputation: 1828

jquery picklist plugin supporting rich content - is there one?

I'm trying to find a picklist plugin that can support the display of images, which rules out select and option tags (and hence this plugin: http://gsgd.co.uk/sandbox/jquery/picklists/). Does anyone know of one? I've looked high and low with no success.

There was one "Dodo's picklist" but the link is dead.

Thanks.

Upvotes: 2

Views: 1618

Answers (3)

Cagatay Civici
Cagatay Civici

Reputation: 6504

PrimeUI's PickList supports customizable content;

http://www.primefaces.org/primeui/picklist.html

Upvotes: 0

The Awnry Bear
The Awnry Bear

Reputation: 4619

Another one to check out is jquery-picklist. It creates a picklist from a regular HTML multiple option <select>, like this:

Example HTML:

<select id="foobar" name="foobar" multiple="multiple">
    <option value="1">Foo</option>
    <option value="2">Bar</option>
    <option value="3">Foobar</option>
</select>

<div id="someElement">
    <div><img src="foobar.png" /></div>
    <div>A rich item!</div>
</div>

Example JS:

$("#foobar").pickList(
{
    items:
    [
        {
            value: 4,                   // Sent in POST (if item has been selected)
            label: "A Rich Item"        // Used for sorting, not displayed for rich items
            selected: true,             // true puts item in "selected" list, false puts item in "available" list
            element: $("#someElement")  // The DOM element to be used as the item
        }
    ]
});

As shown in the example, an array of object literals can be passed in during initialization. These object literals define the items to be added to the list during creation.

Rich content items can be added by specifying the element property in the object literal. Any DOM element (preexisting or created on-the-fly) can be used. Details on rich content items is documented here.

Disclaimer: I'm the author of the plugin. I encourage you to try them all out for yourself and decide what works for you.

Upvotes: 1

Erik I
Erik I

Reputation: 1072

Did you try http://code.google.com/p/jquery-picklist/ ?

I just had a look at the demo (which also contains the documentation), and it looks like what you are asking for.

Upvotes: 1

Related Questions