Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery tabs in IE 9 not working properly
    primarykey
    data
    text
    <p>I have this simple js tabs.</p> <p>Here is the html :</p> <pre><code>&lt;div class="product-collateral"&gt; &lt;div class="tab"&gt; &lt;h3 class="product_tabs_agenda"&gt;Tab 1&lt;/h3&gt; &lt;/div&gt; &lt;div class="product-tabs-content" id="product_tabs_agenda_contents"&gt; &lt;p&gt;Tab1 Content&lt;/p&gt; &lt;/div&gt; &lt;div class="tab"&gt; &lt;h3 class="product_tabs_terms"&gt;Terms and Conditions&lt;/h3&gt; &lt;/div&gt; &lt;div class="product-tabs-content" id="product_tabs_terms_contents"&gt; &lt;p&gt;Some terms and conditions&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>And the java is as follow:</p> <pre><code>&lt; script type = "text/javascript" &gt; $jQ('.product-collateral .tab h3').wrapAll('&lt;ul class="product-tabs"&gt;&lt;/ul&gt;').wrap('&lt;li&gt;&lt;/li&gt;'); $jQ('.product-collateral .product-tabs li').each(function(index) { $jQ(this).attr('id', $jQ(this).find('h3').attr('class')); if (index == 0) $jQ(this).addClass('active'); }); //&lt;![CDATA[ Varien.Tabs = Class.create(); Varien.Tabs.prototype = { initialize: function(selector) { var self = this; $$(selector + ' h3').each(this.initTab.bind(this)); }, initTab: function(el) { el.href = 'javascript:void(0)'; if ($(el.parentNode).hasClassName('active')) { this.showContent(el); } el.observe('click', this.showContent.bind(this, el)); }, showContent: function(a) { var li = $(a.parentNode), ul = $(li.parentNode); ul.select('li', 'ol').each(function(el) { var contents = $(el.id + '_contents'); if (el == li) { el.addClassName('active'); contents.show(); } else { el.removeClassName('active'); contents.hide(); } }); } } new Varien.Tabs('.product-tabs'); //]]&gt; &lt; /script&gt; </code></pre> <p>The tabs are working fine apart from internet expoler. I was trying to find the bug in the code - unfortunately unsuccessfully.</p> <p>Any hepl much appreciated.</p> <p>Many thanks in advance!</p> <p>Dom</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload