I had the same problem in IE7 and several others, and I spent a couple of hours trying to fix everything we could think of, but to no avail. I figured it was not worth it to continue debugging something, which was probably a bug in jQuery UI (for IE7) and rewriting all JS in three lines of jquery. For reference, if anyone else struggles with this, this is what I did.
HTML
<div id='tabs'> <ul> <li><a href='#tab-1'></a><li> <li><a href='#tab-2'></a><li> <li><a href='#tab-3'></a><li> </ul> <div id='tab-1'> <p>Some content</p> </div> <div id='tab-2'> <p>Some content</p> </div> <div id='tab-3'> <p>Some content</p> </div> </div>
corresponding css (using scss here)
#tabs { position: relative; height: 250px; & > div { position: absolute; top: 0; margin-top: 10px; &.hidden { visibility: hidden; } }
javascript (jquery required)
$('#tabs li a').click(function(){ $('#tabs > div').addClass('hidden'); $($(this).attr('href')).removeClass('hidden'); });
Hope this helps someone. This is probably a lot lighter than using the full tabs plugin anyway, to be honest, and does this job pretty well. If this is not complete enough or you cannot make this code work, write me a comment and I will help you or come up with a js script.
Jeff escalante
source share