/    Sign up×
Community /Pin to ProfileBookmark

anyone know much about jquery/ajax???

hi.
bascially i am trying to dynamically load page content using jquery.

Something like this…

[CODE]
$(document).ready(function(){
$(“#mirrors”).click(function(){
$(‘#gallery-thumbs’).load(‘gallery_thumbs.html’);
$(‘#front-page-text’).load(‘mirrors-text.html’);
});
});[/CODE]

The issue is with loading the gallery_thumbs.html file as there are javascript events associated with the gallery thumbs.

For example the thumbs display ok but they should fade in when i hover over them.

Im guessing this is becuase the page is dynamically created after the DOM has loaded therefore JQuery does not have any reference of the ID/classes of the html which is inserted.

Can anyone sugguest what i can do to solve such an issue?
Is there anyway to refresh/update the DOM once the page has been created?

Thanks.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ssbeats 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...