jquery - 鼠标悬停时增加 div 的大小

标签 jquery css

我想当鼠标悬停在 div 上时增加 div 的大小。
该 div 应该位于页面上已准备好的其他 div 之上。
一切都工作正常,除了当我在 div 上多次通过鼠标时,尺寸不断增加和减少多次。

.news {
background-color: #ECEEF1;
border-bottom: 1px solid #C46211;
border-right: 1px solid #C46211;
color: #000000;
float: right;
height: 24px;
padding-right: 10px;
padding-top: 8px;
width: 600px;

}

我创建了一个 fiddle http://jsfiddle.net/h4FcV/183/展示示例。

最佳答案

您应该使用clearQueue() $(this).clearQueue();

When the .clearQueue() method is called, all functions on the queue that have not been executed are removed from the queue

updated fiddle

关于jquery - 鼠标悬停时增加 div 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17670300/

相关文章:

javascript - 打开/关闭显示

javascript - 使用 jQuery/JavaScript 从 iframe 以事件屏幕为中心的 DIV

css - 显示 : table-cell image and text on single line (responsive design)

javascript - .position() 不指向容器

css - 使用 Crunch 进行 LESS 字符串插值?

javascript - 将类与表行匹配

javascript - jqgrid 没有数据绑定(bind),只有空列

javascript - 使用plunker时是否需要专门分离css和js

css - 内联元素内 CSS 中的目标值

php - 如何使用 Woocommerce WC_AJAX 类