show a page only 5 seconds then hide javascript code example Example: js show span for 5 seconds $("#myElem").show().delay(5000).fadeOut();