I have a div with a CSS style to show it as a button:
<div id="Word1" class="btn green" onclick="WordClicked(1);">Word 1</div>
And CSS styles:
.btn {
display: inline-block;
background: url(btn.bg.png) repeat-x 0px 0px;
padding: 5px 10px 6px 10px;
font-weight: bold;
text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
text-align: center;
border: 1px solid rgba(0,0,0,0.4);
-moz-border-radius: 5px;
-moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
-webkit-border-radius: 5px;
-webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5);
}
.green {background-color: #CCCCCC; color: #141414;}
I want to fade out text inside div, change text, and then fade in text again. But I don't want to fade in and fade out div.
If I use this javascript code:
$('#Word1').fadeOut('fast');
I will fade out div and text inside.
How can I do that?