it works if it's a preloaded element, but not if it was added dynamically.
I can't use jquery's delegate,live,bind since i have no event, i need to add that class when my ajax call get a specific response.
This one line doesn’t tell us anything. Please show us more. Also, if you add the element dynamically within an AJAX function or whatever, it is probably within that function that you need to add the class.
More code won't help here.
$("#tabs [room_id='"+msg_room+"']")
is selecting an element which has been added dynamically using ajax, and
I am guessing that's why addclass doesn't work, and that's my problem.
I have an addition ajax script running each second, when a response triggers
that function, i need to execute that code, so i can't use
$("#rooms").delegate('li','click', function() {....
because i am not clicknig anything or any other event to trigger it.
I’m sorry, but how can you determine what helps and what doesn’t? After all, it’s you who wants help from us. If you don’t care to provide any more information even if someone asks for it how can you expect any helpful reply? Am I speaking with myself when I say we need more code? Or do you expect me to use my magic psychic power to read your mind?