Can't get parent div hover if on iframe in IE.

Can't get parent div hover if on iframe in IE.

Hello,


I've again searched a lot and haven't found a working solution and I don't understand,what am I doing wrong.

I have a divs that contain different iframes.The divs have hover effect,but as soon as the mouse enters the iframe,the hover effect is gone from the parent div.I know that it is an issue only with IE and I know that there is a workaround with jQuery,but I can't get it working.

My code so far:

  1. if ($.browser.msie)

    $( ".leftcol iframe" ).hover( function () {

    $( this ).parents( ".leftcol" ).toggleClass( "hover" );

    });

The parent div class is .leftcol (I also have to do the same thing with div class .rightcol) and the iframe is just the source.

The HTML:

  1. <div class="leftcol">
    <iframe src="somesimple.html" style="border: medium none ;"
     onload="resizeIframe(this)" padding="-6" height="0"
     scrolling="no" width="170"></iframe></div>


What is wrong in my jQuery code?


With best regards,