Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery addClass() not working in IE6
    primarykey
    data
    text
    <p>If you look at <a href="https://imgur.com/vQzqE.png" rel="nofollow noreferrer">this screenshot</a>, I am trying to have the red image show under a link when you click it. If you click Link 2, it will show under link 2.</p> <p>It is working in all majore browser except IE 6. When I click a link in IE 6 it loads the on class for the ul, but the image does not show.</p> <p>Can anyone see a problem with the code I have?</p> <p>Thanks in advance for your help!</p> <p>Here is the HTML:</p> <pre><code>&lt;ul id="slider-links"&gt; &lt;li class="on"&gt;&lt;a href="#"&gt;Link 1&lt;/a&gt;&lt;img src="img/slider-handle.png" width="316" height="42"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Link 2&lt;/a&gt;&lt;img src="img/slider-handle.png" width="316" height="42"&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Link 3&lt;/a&gt;&lt;img src="img/slider-handle.png" width="316" height="42"&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Here is the jQuery:</p> <pre><code>$("#slider-links a").click(function(){ $(this).parent().siblings(".on").removeClass("on"); $(this).parent().addClass("on"); }); </code></pre> <p>Here is the CSS:</p> <pre><code>#slider-links li { position: relative; z-index: 8000; background: #bed2d9; border-bottom: 1px solid #69868f; } #slider-links li.on a {color: #dbdbdb;} #slider-links li a { padding: 10px 15px; display: block; color: #234a5b; font-size: 16px; font-weight: bold; text-decoration: none; position: relative; z-index: 10000; } #slider-links li.on img {display: block;} #slider-links img { position: absolute; top: -1px; left: 0; z-index: 9000; display: none; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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