兄弟 有一个很大的bug  你这个this指针指向不明确啊 多个同名类调用你这个方法就炸掉了  还有最好是innerWidth 和 innerHeight  改了其中一个
function num3() {
    // top边框
    var divTop = "<div style='" + becurr + "top:-2px;left:-2px;width:0px;height:2px' class='divTop'></div>";
    // right边框
    var divRight = "<div style='" + becurr + "top:-2px;right:-2px;width:2px;height:0px;' class='divRight'></div>";
    // Bottom边框
    var divBottom = "<div style='" + becurr + "bottom:-2px;right:-2px;width:0px;height:2px' class='divBottom'></div>";
    // Left边框
    var divLeft = "<div style='" + becurr + "bottom:-2px;left:-2px;width:2px;height:0px;' class='divLeft'></div>";
    _this.hover(function() {
        var n1 = $(this).innerWidth();
        var h1 = $(this).innerHeight();
        var el = $(this)
        el.append(divTop, divRight, divBottom, divLeft);
        var itTopBottom = $(this).find('.divTop,.divBottom'),
            itRightLeft = $(this).find('.divLeft,.divRight');
        itTopBottom.stop().show().animate({
            width: n1 + 3.5
        }, options.speed);
        itRightLeft.stop().show().animate({
            height: h1 + 3.5
        }, options.speed);
    }, function() {
        var itTopBottom = $(this).find('.divTop,.divBottom'),
            itRightLeft = $(this).find('.divLeft,.divRight');
        itTopBottom.stop().show().animate({
            width: 0
        }, options.speed);
        itRightLeft.stop().show().animate({
            height: 0
        }, options.speed, function() {
            itTopBottom.remove();
            itRightLeft.remove();
        });
    })
}
                                    
                                    回复