javascript - jQuery fade in content while using Ajax .append() -



javascript - jQuery fade in content while using Ajax .append() -

trying utilize jquery .fadein() on 'load more' button pulling json html markup server on .append(response). syntax .append(response).fadein('slow'); not seem work, believe dom issue because info appended page before .fadein() has chance work.

any suggestions how accomplish type of effect? javascript below.

$(function () { var offset = 10; $(".load-more-cell").click(function() { $.post("load-more-notifications", {offset: offset, limit: 30}, function (response) { $(".notification-table-body").append(response); offset += 30; }); }); });

append returns current collection, i.e. ".notification-table-body" elements, doesn't contain appended elements, if want phone call fadein on appended elements should @ first create collection contains them , phone call method:

$(response).hide().appendto('.notification-table-body').fadein();

javascript jquery ajax

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

java - Parsing XML, skip certain tags -

c# - ASP.NET MVC Sequence contains no matching element -