/    Sign up×
Community /Pin to ProfileBookmark

Jquery Firefox Like Loading Image

I have developed a site with tabs and each tab has an individual div that is displayed when the tab is clicked like a normal web browser does.
On page load each tab is loaded one after the other (due to the amount of database content in each div). What i am trying simulate is the Loading indicator as shown in the tabs of say a firefox browser, where the indicator spins until the page is fully loaded

This code keeps the indicator in the tab even after finished loading:

[code=html]$(“#type0_container”).load(“type0.php”, {
supplier_id: ‘1’,
select: function(event, ui){
$(“#image”).html(“<img src=’indicator.gif’>”)
}
});[/code]

and this one does not even show the indicator at all:

[code=html]
$(“#type0_container”).load(“type0.php”, {
supplier_id: ‘1’,
select: function(event, ui){
$(“#image”).html(“<img src=’indicator.gif’>”)
}
}).after($(“#image”).html(“”));
[/code]

type0_container is the div where all of the data loads
and the #image is in the tab to display the indicator gif.

I guess what I am looking for is a function that triggers after page load.

Any advice?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @hgit spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...