jquery - On mouseover using Javascript I have a separate div changing colour but I need to reset the function after use? -
below link code.
i need able hover , forth "red" , "blk" functions changing colour , forth also. believe needs reset somehow?
$('#red').on('mouseover', function() { $('#blue1').addclass("green"); }); $('#blk').on('mouseover', function() { $('#blue1').addclass("black"); });
thank you.
try
$('#red').on('mouseover', function() { $('#blue1').addclass("green"); $('#blue1').removeclass("black"); }); $('#blk').on('mouseover', function() { $('#blue1').addclass("black"); $('#blue1').removeclass("green"); });
Comments
Post a Comment