Why not using a for or wile loop for the repetetive adding?

$(function() {
    $("#example > ul").tabs({
        cache: true,
        load: function(e, ui) {
            $("#seasons > ul").tabs();
            for (var year = 2008; year >= 1996; year--)
                $(".seasonSelector").tabs("add", "./season.php?
season=" + year, year + " Season");

            ...
        }
    });
});


--Klaus


On Jul 1, 4:10 am, Sam <[EMAIL PROTECTED]> wrote:
> Thanks, that took care of it.
>
>   $(function(){
>     $("#example > ul").tabs({
>         cache: true,
>         load: function(e, ui) {
>               $("#seasons > ul").tabs();
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2008", "2008 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2007", "2007 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2006", "2006 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2005", "2005 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2004", "2004 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2003", "2003 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2002", "2002 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2001", "2001 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=2000", "2000 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=1999", "1999 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=1998", "1998 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=1997", "1997 Season");
>               $(".seasonSelector").tabs("add", "./season.php?
> season=1996", "1996 Season");
>             }
>     });
>     $(".selector").tabs("add", './overall2.php', 'Overall Results');
>     $(".selector").tabs("add", './newReport.php', 'Add New Result');
>     $(".selector").tabs("add", './last200.php', 'Last 200');
>     $(".selector").tabs("add", './showPie.php', 'by City');
>     $(".selector").tabs("add", './stats.php', 'Other Stats');
>     $(".selector").tabs("add", './seasons.php', 'Season Records');
>     $(".selector").tabs("add", './newGames.php', 'Recent Results');
>     $(".selector").tabs("add", './theHat.php', 'Hat Results');
>   });
>
> On Jun 29, 4:00 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
>
> > You probably need to tabify in the load callback:
>
> > $('#example').tabs({
> >     load: function(e, ui) {
> >         $('ul', ui.panel).tabs(); // adapt selector here...
> >     }
>
> > });
>
> > --Klaus
>
> > On Jun 29, 5:48 pm, Sam <[EMAIL PROTECTED]> wrote:
>
> > > The tabs work fine on the first page, but I need a second group of
> > > tabs on the "by Season" tab. The code is there, but the tabs don't
> > > generate on document ready.
>
> > > front page:
>
> > >http://www.texas-asl.com/ladder/ladder.php
>
> > > by Seasons tab page:
>
> > >http://www.texas-asl.com/ladder/seasons.php

Reply via email to