Remove background color attribute from css onmouseover using JQuery

css, javascript, jquery

Solution

You need to use `transparent`, empty string isn't a valid background color.

Also you could just do it with css using a `hover` flag:

#LoginTab:hover
{
    background-color: transparent;
}

Problem

I'm trying to remove background color of a div onmouseover. ``` $("#LoginTab").mouseover(function(){ //Gives me white color $("#LoginTab").animate({backgroundColor: ''},1000); }); $("#LoginTab").mouseout(function(){ $("#LoginTab").animate({'backgroundColor':'#babfde'},1000); }); ``` Here is the CSS ``` #LoginTab { background-color:#babfde; padding-top:5px; padding-bottom:5px; opacity:1; border:#babfde 2px solid; } ``` So the effect I want is that background color will be removed which will give me only border and stuff inside that div onmouseover

Original source