Well if you want to fade in something it has to be hidden first. If the example with hide() doesn't work, just hide it straight from html.
$.getJSON(urlForDescription, function(data) { $div = $("<div class='info' style='display:none;'>" + data + "</div>"); $element.after($div).fadeIn(); }); On Dec 9, 12:06 am, "Jan Limpens" <[EMAIL PROTECTED]> wrote: > On Mon, Dec 8, 2008 at 7:20 PM, MorningZ <[EMAIL PROTECTED]> wrote: > > you'll have to do the fadeIn inside the callback of getJSON > > var showDescription = function() { > $element = $("a.info", this); > if ($element.next("div.info").length == 0) { > var urlForDescription = $element.attr('href') + '/descricao'; > $.getJSON(urlForDescription, function(data) { > $div = $("<div class='info'>" + data + "</div>"); > $element.after($div).fadeIn(); > }); > } else { > $element.next("div.info").fadeIn(); > } > > } > > also, just pops up. :( > > -- > Jan