• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

128
Views
JQuery wait x seconds after document ready

following code waits till dom ready

jQuery(document).ready(function(){

what do i have to write to simple let the execution of the jquery function wait for 2 seconds after the document is ready?

i need this to narrow down a conflict between multiple instances of a plugin.

THX

almost 3 years ago · Santiago Trujillo
3 answers
Answer question

0

Wrap your existing function with a call to setTimeout, ie, replace your current:

jQuery(document).ready(function() {
     ....
});

with

jQuery(document).ready(function() {
    setTimeout(function() {
         ....
    }, 2000);
});
almost 3 years ago · Santiago Trujillo Report

0

You can use

$(window).load(function(){}); 

instead of

$(document).ready(function(){});

I took reference from jquery forum

almost 3 years ago · Santiago Trujillo Report

0

By using window.setTimeout.

almost 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error