Note that there are some explanatory texts on larger screens.

plurals
  1. POhorizontal accordion not working in Safari or Chrome
    text
    copied!<p>I'm sure I'm missing something obvious here, as I'm relatively new to jQuery.I'm trying to build a horizontal accordion. So far, it works fine in FF but not in Safari or Chrome.</p> <p>In Safari and Chrome, the .content divs appear beneath their respective accordion panes rather than retaining their position and exhibiting the width animation.</p> <p>Thanks in advance for any help.</p> <p>Here's a link to the example: <a href="http://www.billjordandesign.com/jQuery_tests/horizontal_accordion.html" rel="nofollow">http://www.billjordandesign.com/jQuery_tests/horizontal_accordion.html</a></p> <p>Here's my jQuery:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function() { $('.content').hide(); $('.content:first').show(); $('a').click(function(){ $('.content').hide(); $(this).siblings('.content').animate({'width':'toggle'}, 'slow', 'easeOutBack') }); }); &lt;/script&gt; </code></pre> <p>...here's my HTML:</p> <pre><code>&lt;div id="navigation"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;&lt;div class="pane"&gt;&lt;div class="verticaltext"&gt;Home&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="content"&gt;1&lt;/div&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt; &lt;div class="pane"&gt;&lt;div class="verticaltext"&gt;About&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="content"&gt;2&lt;/div&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt; &lt;div class="pane"&gt;&lt;div class="verticaltext"&gt;Overview&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="content"&gt;3&lt;/div&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt; &lt;div class="pane"&gt;&lt;div class="verticaltext"&gt;Services&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="content"&gt;4&lt;/div&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt; &lt;div class="pane"&gt;&lt;div class="verticaltext"&gt;Contact&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/a&gt;&lt;div class="content"&gt;5&lt;/div&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>...here's my CSS:</p> <pre><code>#navigation{ position:absolute; display:block; top:100px; width:1000px; height:400px; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#333; } #navigation a{ font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; color:#FFF; } #navigation a:hover{ font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; color:#FFF; } #navigation ul{ margin:0; padding:0; height:400px; list-style-type:none; list-style-image:none; } #navigation li{ display:inline; border-right:thin #FFF solid; float:left; } .pane{ position:relative; display:block; height:400px; width:50px; background-color:#09F; float:left; } .verticaltext { position:absolute; display:block; width:50px; bottom:50px; font-family:Arial, Helvetica, sans-serif; font-size:24px; font-weight:bold; color:#FFF; text-align:center; letter-spacing:-1px; -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); } .content{ position:relative; display:block; width:400px; height:400px; left:10px; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#333; float:left; background-color:#FFF } </code></pre>
 

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