I managed to solve the selected option.issue. It has to do with my
variable tab_cookie_id. Changed my code from
var tab_cookie_id = jQuery.cookie("todos_tab") || 0;
to
var tab_cookie_id = parseInt(jQuery.cookie("todos_tab")) || 0;
And my issue was resolved. My guess is the selected option expects an
integer.
Steve
On Nov 2, 9:24 pm, stevel <[EMAIL PROTECTED]> wrote:
> I tried using ui.index for my intended codes and it worked for me
> allowing me to save the correct latest selected tab index.
>
> jQuery(document).ready(function(){
> var tab_cookie_id = jQuery.cookie("todos_tab") || 0;
> jQuery("#taskboard > ul").tabs({
> selected: tab_cookie_id,
> select: function(e,ui){
> jQuery.cookie("todos_tab", ui.index);
> }
> });
>
> });
>
> However I encountered a new set of problem. This time it is with the
> selected: option. When my index is 0, it works fine. But anything more
> than zero produced unexpected result. If my index is 1, the second tab
> onwards are all selected. (I have 4 tabs. And tabs 2-4 are all
> selected.) If my index is 2, then the third tab onwards till the last
> tab are selected. And so on. Is this a bug I wonder?
>
> Steve
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---