I have a limited understanding of Javascriptan I am trying to add a class to a div when I hover another div Right now I can add a class to the same div but I would like to be able to add let's say the class blue to a div called first when I hover #second and #third.
current code :
    
    $(document).ready(function() {     
    $("#second, #third").hover(function(){     
    $(this).addClass("hover");    
    $(this).removeClass("hoverable");      
    },     
    function(){    
    $(this).removeClass("hover");     
        $(this).addClass("hoverable");     
    }  
    );     
    });        
My live website can be seen at : www.designinterieurm2.com/dev
$(document).ready(function() {     
    $('#second, #third').hover(function(){     
        $('#first').addClass('blue');    
    },     
    function(){    
        $('#first').removeClass('blue');     
    });
});   
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With