我希望.car-info dorpdown当.title-bar是鼠标悬停所以.car-info addClass .........
$(".items .title-bar").on("mouseover", function () {
//i wanted .title-bar is addClass down
// .carinfo on mouseover is addClass down
});
$(".items .title-bar").on("mouseout", function () {
//i wanted .title-bar is removeClass down
// carinfo on mouseover is removeClass down
});
我想要这种风格
当我悬停时
答案 0 :(得分:1)
试试这个
$(".items").on("mouseover", function () {
$(this).find('.title-bar').addClass('down')
$(this).find('.car-info').addClass('down')
});
$(".items").on("mouseout", function () {
$(this).find('.title-bar').removeClass('down')
$(this).find('.car-info').removeClass('down')
});