Thank you! But how do you memorize the state of the tabs? When you
click a tab it will work until the refresh of the page is finished and
the original mark-up is effective again.

On Oct 16, 11:15 am, "Richard D. Worth" <rdwo...@gmail.com> wrote:
> I imagine you wouldn't need any more code than Bi Jing has given you to
> handle even 100 tabs, since it uses classes, not IDs.
> - Richard
>
> On Fri, Oct 16, 2009 at 10:53 AM, lukas <animod...@gmail.com> wrote:
>
> > Thank you for your quick response! In the meantime I tried something
> > similar, I thought there is a solution which doesn't require that much
> > code. (Imagine you have 10 tabs!)
>
> > On Oct 16, 3:57 am, Bi Jing <beco...@gmail.com> wrote:
> > > Firstly, define a new css class , selected_tab , as following:
>
> > > //Style code
> > > .selected_tab{
> > > background-color:#ccc;
> > > color:#000;
>
> > > }
>
> > > //Script code
> > > //$(".tab") indicate all of your tab elements.
> > > $(".tab").click(function(){
> > >     $(".selected_tab").removeClass("selected_tab"); // clear current
> > select
> > > tab style
> > >     $(this).addClass("selected_tab");}
>
> > > )
>
> > > Hope that helps.
>
> > > Becoder.
>
> > > On Fri, Oct 16, 2009 at 11:57 AM, lukas <animod...@gmail.com> wrote:
>
> > > > Can anybody direct me to a lightweight jquery script controlling tabs?
> > > > I just want the activated tab to appear differently than the rest of
> > > > the tabs. Thank you!

Reply via email to