Solved

Jquery Load Delay

Posted on 2013-02-01
2
173 Views
Last Modified: 2013-02-19
Hi Guys,

I have this script:
$(function() {
    $(".wcGridCol li").click(function() {
	$('#ContentContainer').fadeIn('slow');
        $('.Loader').fadeIn('slow');
        $("#ContentContainer").load("article.html", function(){ });
        return false;
    });
});

Open in new window


I am trying to add a delay on the load function so .Loader displays for 2 seconds as a minimum rather than load content immediately.

Then I would like to add a fadein effect to the loaded content.

Could someone assist.. Many thanks in advance
0
Comment
Question by:maccaj51
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
soupBoy earned 500 total points
ID: 38844200
I don't know if it would work the the .load api or not....but try adding a .delay(2000)

example:
$("#ContentContainer").delay(2000).load("article.html", function(){ });

Open in new window

0
 

Author Closing Comment

by:maccaj51
ID: 38905925
Many Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question