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

Your preferred username that is used when logging in.

Conflict between initialIndex:null and history: true on tabs Created May 12, 2010

This thread is solved

Views: 2008     Replies: 3     Last reply Oct 14, 2010  
You must login first before you can use this feature

tomatsos

Posts: 1

Registered:
May 12, 2010

Conflict between initialIndex:null and history: true on tabs

Posted: May 12, 2010

I'm trying to set up tabs to be closed then you enter at the same time I'm using the history.
My example keeps all tabs closed if I leave out the "history:true" (tabs expand on click as the should)

Adding history:true makes the the first tab open on pageload (as if I haven't added "initialIndex:null" )

Is this a bug, or is it "this behavior is by design"? (using version 1.2.1 )

Sample code (not working as expexted):

<!-- the tabs -->
<ul class="tabs">
  <li><a id="t6" href="#news">News</a></li>
  <li><a id="t5" href="#about">About us</a></li>
  <li><a id="t4" href="#contact">Contact</a></li>
</ul>

<!-- tab "panes" -->
<div class="panes">
  <div>Newspane text</div>
  <div>About us text</div>
  <div>Contact text</div>
</div>

<script type="text/javascript" src="http://cdn.jquerytools.org/1.2.1/full/jquery.tools.min.js"></script>
<script type="text/javascript">

    $(function () {

        $("ul.tabs").tabs("div.panes > div", {
            initialIndex: null,
            history: true    

        });
    });


bitmanic
http://bitmanic.com :: http://twitter.com/bitmanic

Posts: 3

Registered:
Aug 17, 2010

» Conflict between initialIndex:null and history: true on tabs

Posted: Aug 17, 2010

Reply to: Conflict between initialIndex:null and history: true on tabs, from tomatsos
I'm having the same issue. Anyone know of a solution?

boogi88

Posts: 11

Registered:
Aug 27, 2010

» Conflict between initialIndex:null and history: true on tabs

Posted: Aug 27, 2010

Reply to: Conflict between initialIndex:null and history: true on tabs, from tomatsos
same issue.... anyone pls reply......

rday

Posts: 1

Registered:
Oct 14, 2010

» » Conflict between initialIndex:null and history: true on tabs

Posted: Oct 14, 2010

Reply to: » Conflict between initialIndex:null and history: true on tabs, from boogi88
Proper fix may take a while, but quick workaround would be just adding an empty 'li' item as shown below


<!-- the tabs -->
<ul class="tabs">
  <li style="display:none"><a id="dummy" href="#dummy"></a></li>
  <li><a id="t6" href="#news">News</a></li>
  <li><a id="t5" href="#about">About us</a></li>
  <li><a id="t4" href="#contact">Contact</a></li>
</ul>

<!-- tab "panes" -->
<div class="panes">
  <div> </div>
  <div>Newspane text</div>
  <div>About us text</div>
  <div>Contact text</div>
</div>