JQuery/[removed] IE hover doesn't cover select box options?

后端 未结 5 1439
半阙折子戏
半阙折子戏 2020-12-11 22:36

I have this bit of script to widen a text box on mouseover and shorten it on mouseoff.

The problem I am having is that Internet Explorer doesn\'t seem to extend it\'

5条回答
  •  不知归路
    2020-12-11 22:51

    WorldWideWeb's answer worked perfectly.

    I had a slighty different problem, I had a hover effect on the containing item (hover to reveal a select menu) of the form field and on IE users couldn't pick from the drop down (it kept resetting the value). I added worldwideweb's suggestion (with the ID of the select) and viola, it worked.

    HEre's what I did:

    $(".containerClass").hover(function() {
        $(this).children("img").hide();
        $('#idOfSelectElement').mouseleave(function(event) { event.stopPropagation(); });
    }, function() {
        $(this).children('img').show();
        $('#idOfSelectElement').mouseleave(function(event) { event.stopPropagation(); });
    
    });
    

提交回复
热议问题