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
Post a Comment