我有4 button
s。我试图通过hover
减轻opacity
。更改鼠标悬停按钮的不透明度
问题:我每次hover
,所有4 button
更迭opacity
减轻,我只是想1 button
同时改变opacity
在hover
。
这是我已经试过:
$(document).ready(function() {
$('button').mouseenter(function() {
$('button').fadeTo('fast', 1);
});
$('button').mouseleave(function() {
$('button').fadeTo('fast', 0.5);
});
});
不工作
从你的智能民族需要有很好的解决方案!
你只想按住按钮来改变不透明权吗? –
使用'$(this)'而不是'$(button)' – andrew
请分享您的HTML代码。 –