TableSorter 2.0 refresh zebra stripe

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

TableSorter 2.0 refresh zebra stripe

reboo

Hi,
when I append a new row on a body a wrote

newRow = "<tr><td>my new row</td></tr>";
$("#myTable").append(newRow);
$("#myTable").trigger("update");

it work.

After i wanna refresh "zebra" stripe... Anyone can help me?

thanks

tommaso
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: TableSorter 2.0 refresh zebra stripe

Kenny Scott-2

Hi,

I may not be able to help in the long run, but there are some things
in your post that I don't understand.

1. "append a new row on a body" - do you mean you're adding a new row
to a table?  If so, I'm not sure how appending data to $("#myTable")
will work, since it'll come after </table>.  Maybe I'm missing
something, though.

2. "zebra" stripe.  How did you generate the "zebra" stripe in the
first place?  That's not clear from your post.

--
Kenny


On Jan 22, 10:16 am, reboo <[hidden email]> wrote:

> Hi,
> when I append a new row on a body a wrote
>
> newRow = "<tr><td>my new row</td></tr>";
> $("#myTable").append(newRow);
> $("#myTable").trigger("update");
>
> it work.
>
> After i wanna refresh "zebra" stripe... Anyone can help me?
>
> thanks
>
> tommaso
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: TableSorter 2.0 refresh zebra stripe

Annoyed-2
In reply to this post by reboo

$("#myTable").trigger("applyWidgets")

On Jan 22, 2:16 am, reboo <[hidden email]> wrote:

> Hi,
> when I append a new row on a body a wrote
>
> newRow = "<tr><td>my new row</td></tr>";
> $("#myTable").append(newRow);
> $("#myTable").trigger("update");
>
> it work.
>
> After i wanna refresh "zebra" stripe... Anyone can help me?
>
> thanks
>
> tommaso
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: TableSorter 2.0 refresh zebra stripe

";
> $("#myTable").append(newRow);
> $("#myTable").trigger("update");
>
> it work.
>
> After i wanna refresh "zebra" stripe... Anyone can help me?
>
> thanks
>
> tommaso
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to jquery-plugins@googlegroups.com
To unsubscribe from this group, send email to jquery-plugins+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---
whisperstream
I'm can't seem to get tablesorter to reapply the zebra striping after an ajax call.

My Setup:
using tablesorter 2.0 and jquery 1.2.6
I have a <div id="data"> and within that div I have a table with id='dataTable'.
When the page is first loaded I apply the tablesorter and it all looks fine
Then I click my update button and an ajax call overwrites the div with a newer version of the table with id='dataTable', the problem is however that the zebra-striping widget doesn't seem to get applied.

Attempt
I have tried triggering applyWidgets, update without success.  I can get striping back if I call my original tablesorter config again, but it seems that applyWidgets isn't working.

Latest Theory
Is it because I'm replacing the whole table and not just updating a few rows or am I missing something?

Any help would be  greatly appreciated,

Thanks

annoyed wrote
> $("#myTable").trigger("update");
$("#myTable").trigger("applyWidgets")

On Jan 22, 2:16 am, reboo <tommaso.taru...@gmail.com> wrote:
> Hi,
> when I append a new row on a body a wrote
>
> newRow = "
my new row
Reply | Threaded
Open this post in threaded view
|

Re: TableSorter 2.0 refresh zebra stripe

wiboi-2

Hi,

after you have loaded data using ajax & appended / updated it to
table, do $.trigger("appendCache").

I had this same problem and it took me a while to figure out how to
solve it...not so many related examples on the net, maybe this was too
trivial :-)

Hope this helps.

--w


On Feb 16, 4:30 am, whisperstream <[hidden email]> wrote:

> I'm can't seem to get tablesorter to reapply thezebrastriping after an ajax
> call.
>
> My Setup:
> using tablesorter 2.0 and jquery 1.2.6
> I have a <div id="data"> and within that div I have a table with
> id='dataTable'.
> When the page is first loaded I apply the tablesorter and it all looks fine
> Then I click my update button and an ajax call overwrites the div with a
> newer version of the table with id='dataTable', the problem is however that
> thezebra-striping widget doesn't seem to get applied.
>
> Attempt
> I have tried triggering applyWidgets, update without success.  I can get
> striping back if I call my original tablesorter config again, but it seems
> that applyWidgets isn't working.
>
> Latest Theory
> Is it because I'm replacing the whole table and not just updating a few rows
> or am I missing something?
>
> Any help would be  greatly appreciated,
>
> Thanks
>
>
>
> annoyed wrote:
>
> >> $("#myTable").trigger("update");
> > $("#myTable").trigger("applyWidgets")
>
> > On Jan 22, 2:16 am, reboo <[hidden email]> wrote:
> >> Hi,
> >> when I append a new row on a body a wrote
>
> >> newRow = "<tr><td>my new row</td></tr>";
> >> $("#myTable").append(newRow);
> >> $("#myTable").trigger("update");
>
> >> it work.
>
> >> After i wanna refresh "zebra" stripe... Anyone can help me?
>
> >> thanks
>
> >> tommaso
>
> --
> View this message in context:http://www.nabble.com/TableSorter-2.0-refresh-zebra-stripe-tp21601376...
> Sent from the jQuery Plugins mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: TableSorter 2.0 refresh zebra stripe

";
> >> $("#myTable").append(newRow);
> >> $("#myTable").trigger("update");
>
> >> it work.
>
> >> After i wanna refresh "zebra" stripe... Anyone can help me?
>
> >> thanks
>
> >> tommaso
>
> --
> View this message in context:http://www.nabble.com/TableSorter-2.0-refresh-zebra-stripe-tp21601376...
> Sent from the jQuery Plugins mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Plugins" group.
To post to this group, send email to jquery-plugins@googlegroups.com
To unsubscribe from this group, send email to jquery-plugins+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jquery-plugins?hl=en
-~----------~----~----~----~------~----~------~--~---
shinyhat
I was gonna rip my hair out trying to find that. Worked like a charm. Thanks a bunch!

wiboi-2 wrote
Hi,

after you have loaded data using ajax & appended / updated it to
table, do $.trigger("appendCache").

I had this same problem and it took me a while to figure out how to
solve it...not so many related examples on the net, maybe this was too
trivial :-)

Hope this helps.

--w


On Feb 16, 4:30 am, whisperstream <j...@alf2.com> wrote:
> I'm can't seem to get tablesorter to reapply thezebrastriping after an ajax
> call.
>
> My Setup:
> using tablesorter 2.0 and jquery 1.2.6
> I have a <div id="data"> and within that div I have a table with
> id='dataTable'.
> When the page is first loaded I apply the tablesorter and it all looks fine
> Then I click my update button and an ajax call overwrites the div with a
> newer version of the table with id='dataTable', the problem is however that
> thezebra-striping widget doesn't seem to get applied.
>
> Attempt
> I have tried triggering applyWidgets, update without success.  I can get
> striping back if I call my original tablesorter config again, but it seems
> that applyWidgets isn't working.
>
> Latest Theory
> Is it because I'm replacing the whole table and not just updating a few rows
> or am I missing something?
>
> Any help would be  greatly appreciated,
>
> Thanks
>
>
>
> annoyed wrote:
>
> >> $("#myTable").trigger("update");
> > $("#myTable").trigger("applyWidgets")
>
> > On Jan 22, 2:16 am, reboo <tommaso.taru...@gmail.com> wrote:
> >> Hi,
> >> when I append a new row on a body a wrote
>
> >> newRow = "
my new row