gpt4 book ai didi

javascript - 仅在使用 jquery 的鼠标按下事件上更改元素 css

转载 作者:行者123 更新时间:2023-11-28 15:38:25 25 4
gpt4 key购买 nike

我只想使用 jQuery 更改 mousedown 事件上的 div css。

$('#xxx').mousedown(function (e) {
$("#xxx").animate({
height: '600px',
width: '600px'
}, 'slow');
})

问题是它也在鼠标点击时运行,我希望事件只在 mousedown 事件上调用。

最佳答案

使用 mouseover() 或者 .focus( handler )

关于javascript - 仅在使用 jquery 的鼠标按下事件上更改元素 css,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56456886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com