brunjo / rowGrid.js

A small, lightweight JavaScript plugin for placing items in straight rows (jQuery and vanilla JS version) – Demo:
http://brunjo.github.io/rowGrid.js/
MIT License
670 stars 78 forks source link

How to display content with effects #14

Closed mpkumar87 closed 10 years ago

mpkumar87 commented 10 years ago

Hi,

I have integrated jquery rowGrid. Need to display ajax content to grid with effects. Please give me suggestion to achieve this.

Thanks..

brunjo commented 10 years ago

Try something like the following.

// append new items with class item-new
$(".container").append("<div class='item item-new'><img src='http://placehold.it/310x200' /></div>");
// arrange appended items
$(".container").rowGrid("appended");

// display items with an effect
var $new = $('.item-new');
$new.fadeIn('slow');
$new.removeClass('item-new');
/* Hide new items */
.item-new {
    display: none;
}

I didn't test this code snippet. Fell free to ask if you have any questions.