views:

139

answers:

0

I'm currently using .hover to handle a hover tab. I'm having to get a little creative because I have a code freeze on the markup. My initial plan was to share a class between the hovered tab and the element which contains the targeted content. In other words, if the tab has class "review" the content element has class "review" as well. This works beautifully in the good browsers, IE however doesn't seem to view this as a continuous hover and effect.

So, my first thought is to target the element being hovered on .hover()'s out callback. I haven't had any success with this. Any suggestions?

Here's an example of the basic tab structure...

<div id="tabContent">
  <ul class="tabs">
    <li class="review">review</li>
    <li class="something">something</li>
  </ul>


  <div class="review">Stuff</div>
  <div class="something">Other Stuff</div>
</div>

And the JS - I don't think this will be terribly helpful without context... but elt is the class

function qvSubTabs(elt) {
 $('.qv .'+elt).hover(function() {
  $('.qv .productInfo').hide();
  $('.qv div.'+elt).show();
  $('li.'+elt).addClass('selected');
  $('#qvBuyNow').hide();
 },
  function() {
   $('.qv .productInfo').show();
   $('.qv div.'+elt).hide();
   $('.qv li.'+elt).removeClass('selected');
   $('#qvBuyNow').show();
  }
 );
}

Thanks