cronos cronos - 1 year ago 167
CSS Question

Fade the output after 1 second

I am trying to display the dimensions of the window and finally I was able to do it:

All i want now is to fade the output text after one second after the resize happened; is this possible?

Code here [code][1]


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

updated fiddle:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download