javascript - How can I fadeIn/fadeOut of text using jQuery (or CSS)? -
i'm building random quote generator , use fadein/fadeout function when switching between quotes when prompted button click. i'm not sure how target text in jquery, since printing array directly javascript this:
$('.show-quote').text(randomquote);
here project far:
i think want: http://codepen.io/anon/pen/gomgql
$('.show-quote').fadeout(300, function(){ $(this).text(randomquote).fadein(300) });
first, fade out in 300ms. when done attached function executed. changes text , fades in.
if don't want background fade out well, can put text in <div>
: http://codepen.io/anon/pen/omxevk
Comments
Post a Comment