Jump to content

jQuery sortable lists/tables


chrischen

Recommended Posts

Two questions.

 

QUESTION 1

Lets say I have a dynamic list of items drawn from a database. In the old way if I wanted to say use javascript to click on it and call a function i'd do it like this:

 

<a href="asdf" onclick="function1("id goes here","something">Item 1</a>

 

<a href="asdf" onclick="function1("id goes here","something else">Item 1</a>

 

<a href="asdf" onclick="function1("id goes here","something">Item 1</a>

 

<a href="asdf" onclick="function1("id goes here","something else">Item 1</a>

 

So how do I do this with jQuery where I want to pass some specific information to the function I'm calling from the item I'm clicking?

 

QUESTION 2

I have a table with a dynamic filtering search. I have a sortable list. Is it possible to make sortable filter-searchable lists? Is it possible to drag from a table row into a list?

 

Thanks,

Chris

Link to comment
Share on other sites

here are 5 good jQuery table/grid plugins:

 

check out the demos and see what suits your needs the most (some have just too many features and are overkill)

 

from what what you said the "Table Drag and Drop" might be the ideal one ;)

 

http://webplicity.net/flexigrid/

http://www.trirand.com/blog/

http://tablesorter.com/docs/

http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

http://plugins.jquery.com/project/uiTableEdit

Link to comment
Share on other sites

No the thing is I have multiple lists and I want to be able to drag from one list to the other, but I found a table plugin that has the search feature. Ideally i'd like to have the search function just for the list so that you type "hi" only the list items that contain "hi" are shown. But if that's not possible I'd like to be able to drag from the table into a list. A list is <ul><li></li></ul>

Link to comment
Share on other sites

Oh sorry if I didn't explain clearly. I already know about the jquery sortables feature. I'm just trying to get that search feature found in the table plugin to work with the sortable lists.

 

Also, I have multiple lists that I allow the user to drag into and I want to be able to serialize each list seperately. But when a list item from somewhere else is dragged into one the lists to be serialized how do I have it serialized in the new list it was dragged to?

Link to comment
Share on other sites

Oh sorry if I didn't explain clearly. I already know about the jquery sortables feature. I'm just trying to get that search feature found in the table plugin to work with the sortable lists.

 

Also, I have multiple lists that I allow the user to drag into and I want to be able to serialize each list seperately. But when a list item from somewhere else is dragged into one the lists to be serialized how do I have it serialized in the new list it was dragged to?

 

oh i see... well actually i don't im kinda confused now.  regardless of sorting and adding into multiple lists you can always get each lists' items from the lists id and you can just serialize the list but iterating over its items and binding that to any list modification...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.