1

Is there anyway to bind a function to the document/window without using events or setInterval/timeout ?

i mean i would like to bind function like :

$(document).bind(function(){
 //if element changed class remove element
});

maybe it's a stupid question but i would like to not use loops over element.

3
  • 1
    And when should that function be called if you don't specify an event? Commented Nov 6, 2012 at 11:08
  • You need to tell the function to be called on a specific event/moment. Browsers don't have mindreaders :p Commented Nov 6, 2012 at 11:10
  • damn i thought it was possible ... :P Commented Nov 6, 2012 at 11:10

1 Answer 1

1

If you are referring to "on DOM change" events, take a look at these answers:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.