3

I need to add an callback function to an css change event. Does this kind of event exists and if so, how to use it ? I tried the following but that didn't work.

$('#websites_table').find('tr').each(function(){
        $(this).css().change(function(){
            alert('changed');   
        });
    });

With friendly greetings, Bob

4
  • 2
    No such event that I know of. Maybe you are looking at this the wrong way...perhaps you can wire up your event to whatever is going to change the css? Commented Oct 19, 2011 at 12:38
  • Are you changing CSS using jQuery, if yes make a function and call that after each change in CSS. hope this could help ... Commented Oct 19, 2011 at 12:38
  • 2
    I think you are looking for something like this. stackoverflow.com/questions/1397251/… Commented Oct 19, 2011 at 12:39
  • Problem is I can't do that. I use the PicNet table filter to filter the results in a table and I would rather not change the source of this plugin because of forward-compatibility. Commented Oct 19, 2011 at 12:39

1 Answer 1

0

Refer to: In JQuery, Is it possible to get callback function after setting new css rule?

To summarize, the css will always change before the code below runs. Ex:

$('#element').css('background', '#000000');
alert('This will run after the background changes.');
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.