D'oh!

Please ignore question! Apparently just writing the question down on paper
helps clear the thought.  Don't know what I was thinking...

I could easily make the table name an attribute to the custom tag and then
do this in my call to the jQuery tableSorter plugin:

<script type="text/javascript">
 //jQuery table sorter function
$(document).ready(function()
{$("#<cfoutput>#attributes.tableName#</cfoutput>").tablesorter();});

</script>

On Thu, Jan 14, 2010 at 4:37 PM, Qing Xia <[email protected]> wrote:

> Hello all,
>
> I am having a dilemma regarding two jQuery plugins: the tableSorter and
> tab.
>
> Here is a brief summary of the problem:
>
>
>    1. I have a task list, which is further broken into sub-categories such
>    as "Problems", "Maintenance" and "Requests".
>    2. I am using the jQuery tab plugin to make each sub-category a tab.
>     This works well.
>    3. Then for each tab, I am also implementing the tableSorter plugin so
>    that users can click on table headers and sort either ascending or
>    descending on that column.
>    4. The tableSorter plugin only works for the first tab. I've tried
>    switching the tabs around and discovered that regardless which one is made
>    the first tab, it only works for it.
>    5. I've got the tableSorter plugin in multiple places throughout my
>    application without tabs so I know it definitely works.
>
> I **think** the cause of the problem is: the task lists are done through a
> custom tag which gets called for each tab to conjure up the list. So even
> though the tableSorter plugin gets called 3 times, they all have the same
> table ID which makes jQuery think they are one big happy table family!
>
> I do not want to not use custom tag for my task lists because that would
> lead to gross duplication of code... but I am also a jQuery newbie... I
> understand in theory that I'd have to pass in a new table ID to the jQuery
> tableSorter plugin each time it is called... but I am a little hazy on the
> syntax of how that can be done.
>
> I am sure someone on this list has done that before. If so, I would be most
> grateful for any suggestions! [?]
>
> Cheers,
>
> Qing Xia
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329695
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to