jquery - Javascript code to fade the output after 1 second -


i trying display dimensions of window , able it:

all want fade output text after 1 second after resize happened; possible?

$(window).on('resize', showsize); showsize(); function showsize() {     $('#size').html($(window).height() + 'px x ' + $(window).width() + 'px'); 

}

  $(window).on('resize', showsize);   showsize();   function showsize() {     $('#size').show(); // show     $('#size').html($(window).height() + 'px x ' + $(window).width() + 'px');     settimeout(function(){         $('#size').fadeout(); // hide after 1 second     }, 1000);   } 

updated fiddle: https://jsfiddle.net/r1vmjxx9/2/


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -