Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Your HTML code is invalid:</strong></p> <pre><code>&lt;a id="drop" class="show_hide" href="#drop"&gt; ... &lt;a id="drop" class="show_hide" href="#drop"&gt; ... </code></pre> <p>It's most likely not working because you've duplicated the <code>id</code> called <code>drop</code>. Each <code>id</code> <strong>must</strong> be unique on the page or browser rendering becomes very unpredictable. It also explains why you get no jQuery/JavaScript errors, but nothing works. Duplicate <code>id</code>'s are discarded from the DOM and jQuery fails to find elements.</p> <p>Only use unique <code>id</code>'s on the page, or try changing it into a <code>class</code> instead:</p> <pre><code>&lt;a class="show_hide drop" href="#drop"&gt; ... </code></pre> <p><strong>Working Demo: <a href="http://jsfiddle.net/yfa32/" rel="nofollow">http://jsfiddle.net/yfa32/</a></strong></p> <hr> <p><strong>EDIT:</strong></p> <p>Your HTML is <strong>still invalid</strong> and that's causing jQuery DOM traversal to fail in Explorer...</p> <pre><code>&lt;ul class="relatedInfoLinks"&gt; &lt;li&gt;...&lt;/li&gt; &lt;div class="slidingDiv"&gt; ... &lt;/div&gt; &lt;li&gt;...&lt;/li&gt; &lt;div class="slidingDiv"&gt; ... &lt;/div&gt; &lt;/ul&gt; </code></pre> <p>You cannot have a <code>&lt;div&gt;</code> as immediate descendants of <code>&lt;ul&gt;</code>... <a href="http://www.w3.org/TR/REC-html40/struct/lists.html#h-10.2" rel="nofollow">as per the spec</a>, only <code>&lt;li&gt;</code> can be immediate descendants of a <code>&lt;ul&gt;</code>. Change these <code>div</code>'s into <code>li</code>'s.</p> <p><strong>Newly updated jsFiddle: <a href="http://jsfiddle.net/yfa32/1/" rel="nofollow">http://jsfiddle.net/yfa32/1/</a></strong></p> <p><strong>Validated HTML is step 1 before chasing any cross-browser issues,</strong> especially Explorer issues.</p> <hr> <p><strong>EDIT 2:</strong></p> <p>Since fixing all HTML validation errors have not solved the OP's problem, I think the <code>.toggle()</code> is trying to open and then immediately closes the element due to interference from the preceding <code>.hide()</code>.</p> <p>Anyway, refactoring the code makes a little more sense and it operates more smoothly without any of the previous blinking. I use a <code>.not()</code> to exclude the current target of the click which leaves that part up to the <code>.toggle()</code> to fully evaluate.</p> <p>I use something very similar myself and it works fine in Explorer...</p> <pre><code>$(document).ready(function () { $(".slidingDiv").hide(); $('.show_hide').click(function () { var ele = $(this).parent().next('.slidingDiv'); //&lt;-- this is the target $('.slidingDiv').not(ele).slideUp(); //&lt;-- closes everything else except the target ele.slideToggle(); //&lt;-- toggles the target }); }); </code></pre> <p><strong>Demo: <a href="http://jsfiddle.net/yfa32/6/" rel="nofollow">http://jsfiddle.net/yfa32/6/</a></strong></p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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