colors - Jquery Fade Out on RollOut -
the jquery script below has 2 background colors set initiate on rollover , rollout respectively. there way have rollover color fade away on rollout rather fadein color?
thanks in advance assistance.
jquery
jquery(document).ready(function($){ //set anchor link opacity 0 , begin hover function $("#menu-sample-menu li").hover(function () { $(this).stop().animate({backgroundcolor:'#3333cc'}, 300); //on mouse-off }, function () { $(this).stop().animate({backgroundcolor:'#000000'}, 200); }); });
html
<nav id="access"> <ul id="menu-sample-menu" class="menu"> <li id="menu-item-198" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-198"><a href="http://www.threecell.com/demo/category/health-care-professional/">health care professional</a> </li> <li id="menu-item-197" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-197"><a href="http://www.threecell.com/demo/category/web-designer/">web designer</a> <ul class="sub-menu"> <li id="menu-item-199" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-199"><a href="http://www.threecell.com/demo/category/construction-worker/">construction worker</a> </li> </ul> </li> </ul> </nav>
style
#access { padding:0 20px; background:#111; box-shadow:0 0 7px rgba(0, 0, 0, .1); } #access ul { float:left; padding:0; margin:0; list-style:none; font-weight:600; text-transform:uppercase; } #access li { position:relative; float:left; padding:0; margin:0; } #access ul li:first-child { padding-left:0; } #access { display:block; padding:15px 24px; color:#f0f0f0; text-decoration:none; } #menu-sample-menu li { color: black; text-shadow: 0px 1px 4px #777; background-color: green; padding: 0 12px 0 12px; } #menu-sample-menu li a.hover { background: orange; } #access li.current_page_item > a, #access li.current-menu-item > { background: orange; color: white; text-decoration:none; } #access span { color:#999; font-size:11px; font-style:italic; font-weight:normal; line-height:1.62em; text-transform:none; }
Comments
Post a Comment