I need to change the position of an element i’m loading with ajax. I want to use .css() to change it but jQuery can’t find the element cause it’s not being recognized. How do i do to make jQuery “recognize” the element?
I’ve read about live() and delegate() but i can’t get neither one of them to work as i want them to. I’d really appreciate some help!
Make the css change in the
completeorsuccessfunction of the ajax call. Assuming you’re usingload:Alternatively (and easier to give as an example) register an
ajaxCompleteeventThis is fired each time an ajax request completes, checks to see if #elementID exists and if so applies the css.