[jQuery] Re: Sort a table when a button is pressed

2007-04-03 Thread Roman Weich
Dmitrii 'Mamut' Dimandt schrieb: Hi. A friend of mine is using the tablesorter plugin on one of the tables on the page. He needs to sort a column when a button on the page is pressed. That is, not the header of the column, but a completely separate button on the page. How can this be achieved?

[jQuery] Re: Sort a table when a button is pressed

2007-04-03 Thread Dmitrii 'Mamut' Dimandt
Thanks! I'll look into that etnt wrote: > I had a similar problem. > I solved it by re-initiating the tableSorter. > Example, here: > > http://tpl.tornkvist.org:8383/ > > (or rather here: http://tpl.tornkvist.org:8383/js/tpl.js ) > > Cheers, Tobbe > > > On Apr 3, 2:22 pm, "Dmitrii 'Mamut' Dimandt

[jQuery] Re: Sort a table when a button is pressed

2007-04-03 Thread Dmitrii 'Mamut' Dimandt
Jeez. That really is the most obvious solution :) Jake McGraw wrote: > > Not sure this is the best way, but you could simulate a click on the > header when the button is clicked like this: > > $("[EMAIL PROTECTED]").click(function(){ > $("table th:eq(0)").click(); > }); > > This will cause the f

[jQuery] Re: Sort a table when a button is pressed

2007-04-03 Thread etnt
I had a similar problem. I solved it by re-initiating the tableSorter. Example, here: http://tpl.tornkvist.org:8383/ (or rather here: http://tpl.tornkvist.org:8383/js/tpl.js ) Cheers, Tobbe On Apr 3, 2:22 pm, "Dmitrii 'Mamut' Dimandt" <[EMAIL PROTECTED]> wrote: > Hi. > > A friend of mine is

[jQuery] Re: Sort a table when a button is pressed

2007-04-03 Thread Jake McGraw
Not sure this is the best way, but you could simulate a click on the header when the button is clicked like this: $("[EMAIL PROTECTED]").click(function(){ $("table th:eq(0)").click(); }); This will cause the first column (th:eq(0)) to be "clicked" and then sorted when a button is "clicked". Not