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?

http://jsfiddle.net/kamg7/

$('#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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -