Understanding

 $(document).ready(function()
  {
  $("#myTable").tablesorter({ widgets: ['zebra']} );
  }
 );



would go a long way to understanding why/how...

That code gets executed *one single time*, when the page is pulled up
and the DOM is "ready"

if at some point after that, you manipulate "#myTable", then the
tablesorting functionality is *gone* and it will need to be wired up
upon re-population.....










On Dec 9, 6:21 pm, "Olivier Percebois-Garve" <[EMAIL PROTECTED]>
wrote:
> Atz some point you've to sum up what is supposed to happen and isolate the
> faulty part.
> No js is running. the row mouseover is probably css. So you've to find out
> why.
> A wrong path to the jQuery files may be a guess.
> Anyway go through the different steps:
> -is jquery properly included (you may download the firefox extension
> "jsview")
> -does the script contain errors (install firebug and activate it, use it)
> -has the table the same id as the the id selected by the script. If you dont
> understand that sentence,
> go to the jQuery website and learn there how "selectors" work, i.e the $()
> function.
> -check if the php generated table is correct. (install the tidy validator
> for firefox)
>
> with all that, you should gain some more autonomy.
>
> Olivier
>
> On Tue, Dec 9, 2008 at 11:24 PM, David Blomstrom
> <[EMAIL PROTECTED]>wrote:
>
> > With the help of this group, I got my first JQuery function to work - a
> > combination sortable table columns/alternate row colors script. The only
> > problem is that it works on my static page but not on a dynamic page in my
> > content management system (PHP).
>
> > The weird thing is that I copied the source code from a dynamic page into
> > my static page, and it does work - but only on the static page.
>
> > On my dynamic page, the sortable column function doesn't work at all. The
> > zebra stripes function works only to the extent that any row I mouseover
> > acquires a colored background.
>
> > Does anyone have a hunch what's going on?
>
> > Thanks.
>
> > * * * * *
>
> > <script src="/1A/js/jquery-1.2.6.min.js" type="text/javascript"></script>
> > <script src="/1A/js/tablesorter/jquery.tablesorter.js"
> > type="text/javascript"></script>
> > <script language="JavaScript" type="text/JavaScript">
> >  $(document).ready(function()
> >   {
> >   $("#myTable").tablesorter({ widgets: ['zebra']} );
> >   }
> >  );
> > </script>

Reply via email to