/    Sign up×
Community /Pin to ProfileBookmark

Custom events!!! need help

Hi:

I was wondering if is there any way to create a custom event in javascript. I would want to know when the content of a div has changed and then fire a function.

Any thoughts?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@KorSep 03.2009 — But that "content of a div" is not to be changed unless a function, which uses some methods, is fired itself by a certain event, following a certain action. Now simply fire the other function at the end of the first function's code lines.

Anyway, your request is too vague. Can you detail a little bit your aim? Maybe an example
Copy linkTweet thisAlerts:
@ScriptageSep 03.2009 — You could do it but it would involve setting a timeout and checking it every x milliseconds.
Copy linkTweet thisAlerts:
@jfhe88authorSep 03.2009 — I acctually want to avoid adding the last line of code in every function that changes the div. But maybe is the easiest way, thanks
×

Success!

Help @jfhe88 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.13,
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,
)...