jquery - targeting hovered element on mouseLeave

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

Answers


Need Your Help

Cloud telephony call forwarding

cloud telephony voice-recording

I am looking for a cloud telephony solution that would allow me to create a routing service. The service would work as follows:

variable scope in a getJson grep

jquery scope getjson

Im trying to use a variable within a grep of a getJson request. I want the variable to be defined based on a users' selection (the link they click on) -- but Im not sure how to pass it to the grep

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.