Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/438.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery:If按钮是";悬停;,在“下一步”按钮中更改样式_Javascript_Jquery_Css - Fatal编程技术网

Javascript jQuery:If按钮是";悬停;,在“下一步”按钮中更改样式

Javascript jQuery:If按钮是";悬停;,在“下一步”按钮中更改样式,javascript,jquery,css,Javascript,Jquery,Css,若主按钮是悬停按钮,我有问题切换“下一步”按钮的样式边框左颜色,若主按钮是“焦点”,我需要相同的“焦点”=>功能 谢谢你的帮助 $("button").hover( function () { $(this).nex("button").css("border-left-color", "#6e6e6e"); }, function () { $(this).nex("button").css("border-left-color", "

若主按钮是悬停按钮,我有问题切换“下一步”按钮的样式边框左颜色,若主按钮是“焦点”,我需要相同的“焦点”=>功能

谢谢你的帮助

$("button").hover(
    function () {
        $(this).nex("button").css("border-left-color", "#6e6e6e");
    }, 
    function () {
        $(this).nex("button").css("border-left-color", "#bdbdbd");
    }
);
仅使用CSS:

button:hover + button {border-left-color: #6e6e6e;}

首先正确的方法是
next()
。然而,为了给你一个完整的答案,我们需要看看你的HTML代码。完美!它的作品,我不知道它可以CSS。非常感谢你!