Hi Martina,

Hum in your code when you select a tab the noTab block will still be
visible is it really what you want? if it's the case yes I think that
is okay, otherwise the example bellow shows you how to hide the noTab
when a user select a tab.

var $tabs = $("#tabs").tabs(
    {
        event: 'mouseover',
        selected: -1,
        select : function(event, ui)
        {
            $('#noTab').hide(); // hidding the noTab
        }
    });

var selected = $tabs.tabs('option', 'selected');
if (selected == -1) // Just making sure that no tabs is selected
{
    $('#noTab').show();
}

Like this when the user load the page the noTab will be displayed and
when he select a tab, the event select will be triggered and will hide
the noTab.


Best,
David

On 4 mai, 01:55, Martina <[email protected]> wrote:
> HI David,
>
> Thanks so much for that this helps alot.
>
> This is what I ended up using;
>
> $(function() {
>         $("#tabs").tabs(
>         {
>             event: 'mouseover',
>             selected: -1
>         });
>         var $tabs = $("#tabs").tabs();
>         var selected = $tabs.tabs('option', 'selected');
>         if (selected == -1) { document.getElementById
> ("noTab").style.display = "block";  }
>     });
>
> It is because I wanted to show some generic information when no tab
> was selected. Do you think that is the best way?
>
> On May 1, 5:39 pm, thedavix <[email protected]> wrote:
>
> > Hello,
>
> > I think you are looking for something like this
>
> > var $tab = $("#tabsDemo").tabs({
> >       selected : -1
> >   });
>
> >http://jqueryui.com/demos/tabs/#option-selected
>
> > Best,
> > David
>
> > On 1 mai, 08:51, Martina <[email protected]> wrote:
>
> > > Is it possible to set a page so that no tab is active when you first
> > > get to it?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to