jquery - How to fadeout borders and bgcolour of a div after some time of pageload? -
i want show div "abc" on page load. @ time suppose background colour yellow. , borders black. after few seconds there text. no borders , bgcolour.
<script> $(window).load(function(){ settimeout(function(){ $('#abc').fadein(); $('#abc').fadeout(); },1000); }); </script> <div id="abc" style="background-color:#ffff99; border:1px; border-style:solid; border-color:#000000;"> hello, want stay, don`t borders , bg. <div>
this looks great use css3 'transition' property if want keep 'fade' effect not fade out div itself.
jquery:
settimeout(function(){ $('#abc').fadein(); $('#abc').addclass('nohighlight'); },1000);
css:
#abc { background-color:#ffff99; border:1px; border-style:solid; border-color:#000000; transition:all 1s;} #abc.nohighlight { background:transparent; border-color:transparent;}
html:
<div id="abc"> hello, want stay, don`t borders , bg. <div>
jsfiddle: https://jsfiddle.net/rh11wgw5/
Comments
Post a Comment