You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

preventing first tab to be selected Created Oct 5, 2009

This thread is solved

Views: 1647     Replies: 2     Last reply Oct 8, 2009  
You must login first before you can use this feature

graphicsxp

Posts: 8

Registered:
Sep 24, 2009

preventing first tab to be selected

Posted: Oct 5, 2009

Hi,
Here's how I create my tabs :

$("ul.tabs").tabs("div.panes > div", {
onClick: function(event, tabIndex) {
}
});

I'm trying to do two things :

1. the onClick event is fired right away. I don't want this to happen.
2. how can I force the second tab to be the selected one at startup ?

can you help ?
thanks

graphicsxp

Posts: 8

Registered:
Sep 24, 2009

» preventing first tab to be selected

Posted: Oct 7, 2009

Reply to: preventing first tab to be selected, from graphicsxp
I've tried the following but the call to click() has no effects at all. There's no errors, it's just that it doesn't do anything...

var api = $("ul.tabs").tabs("div.panes > div", {
onClick: function(event, tabIndex) {

}
}
});
api.click(2);

Can someone help ?

Tero
Author of jQuery Tools and this website + JavaScript developer of Flowplayer.

Posts: 1867

Registered:
Nov 16, 2007

» » preventing first tab to be selected

Posted: Oct 8, 2009

Reply to: » preventing first tab to be selected, from graphicsxp
By default the initialization does not return the API but a jQuery object instead. Use api: true to override this


var api = $("ul.tabs").tabs("div.panes > div", {
  onClick: function(event, tabIndex) {

  },
  api: true
});