Jquery 仅当comments div为collapse时才悬停

Jquery 仅当comments div为collapse时才悬停,jquery,jquery-hover,Jquery,Jquery Hover,我刚开始使用jQuery,需要以下方面的帮助 我在一个固定的div上有我的评论框,只要用户不在页面底部,它就会被折叠。当用户向下滚动时,注释框会随着注释慢慢出现 我现在想要实现的是,只要注释框被折叠,我就想对其应用.hover效果。因此,当用户将其悬停时,div的大小会增加 这就是我到目前为止所做的: var secondary = jQuery(".comments-holder"); var magicFooter = function(){ var scrollBottom =

我刚开始使用jQuery,需要以下方面的帮助

我在一个固定的div上有我的评论框,只要用户不在页面底部,它就会被折叠。当用户向下滚动时,注释框会随着注释慢慢出现

我现在想要实现的是,只要注释框被折叠,我就想对其应用.hover效果。因此,当用户将其悬停时,div的大小会增加

这就是我到目前为止所做的:

var secondary = jQuery(".comments-holder");

var magicFooter = function(){
    var scrollBottom = jQuery(window).scrollTop() + jQuery(window).height();
    var maxHeight =  jQuery("#disqus_thread").height(); 
    jQuery("#colophon").css("height", maxHeight);  
    var mediumHeight = 120;
    var minHeight = 60;

    secondary.height(maxHeight - (jQuery(document).height() - scrollBottom));

    if (secondary.height() <= minHeight) {

            secondary.css("height",minHeight);
            secondary.hover(function(){
                    jQuery(this).css("height",mediumHeight);
            },
            function(){
                jQuery(this).css("height",minHeight);
            });

        } 

}; 
magicFooter();

jQuery(window).scroll(function() {
    magicFooter();
});
var secondary=jQuery(“.comments holder”);
var magicFooter=函数(){
var scrollbooth=jQuery(window.scrollTop()+jQuery(window.height());
var maxHeight=jQuery(“#discus_线程”).height();
jQuery(“#冒号”).css(“高度”,maxHeight);
var中等高度=120;
var-minHeight=60;
secondary.height(maxHeight-(jQuery(document.height()-scrollboth));

如果(secondary.height()你指的是
jQuery(“.comments holder”).mouseenter(function(){magicFooter();})
?不,我不是这个意思。所以,没有人能帮我。也许我或其他人能帮我,但你能用
html
构建一个更清晰的模型吗?答案是:我只是需要更好地表达自己。