I ended up using jquery templates and so far everything is working fine, but now I want to fadeIn a new object into my “template”, I was trying this but it didn’t work out:
$("#itemsTemplate").tmpl(responseText).prependTo( "#map_right_wrap_template" ).fadeIn();
Context:
– responseText is a json object that was returned by a form submission
In other words I want to add (fadeIn) the new-returned element into the template in a very fashion way. As I said everything is working fine except for the fadeIn.
Are you sure that the element is hidden before adding it to the DOM? You can use
.hide()just before adding the element to the DOM to make sure it will start hidden, and then fade in: