Run Function After Delay

jquery

Solution

$(document).ready(function() {

  // place this within dom ready function
  function showpanel() {     
    $(".navigation").hide();
    $(".page").children(".panel").fadeIn(1000);
 }

 // use setTimeout() to execute
 setTimeout(showpanel, 1000)

});

For more see here

Problem

I have the below global jQuery function stored, but on page load, I want to execute it after a 1000 delay. Is there something wrong with my syntax? I know the delay always goes before the function. It is not responding. Global function: ``` function showpanel() { $(".navigation").hide(); $(".page").children(".panel").fadeIn(1000); ;} ``` Executing function: ``` parallax.about.onload=function(){ $('#about').delay(3000).showpanel(); }; ```

Original source

Related problems