Solved

Jquery Load Delay

Posted on 2013-02-01
2
174 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

691 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