-4

基本的に私が達成したいのは、「最初のa」リンクをマウス入力すると2番目のリンクが赤くなり、マウスアウトすると青に戻るはずですが、$('this').

$('body').on('mouseenter', '.shareButtonsWrapper div a:first-child', function(){
    $(this).parent().$(".shareButtonsWrapper div a:last-child").css({"color":"red"});
}).on('mouseleave', '.shareButtonsWrapper div a:first-child', function(){
    $(this).parent().$(".shareButtonsWrapper div a:last-child").css({"color":"blue"});
});

例はこちら。

4

3 に答える 3