I made a code listing database items with PHP (using data-id for jQuery to "read" the click), but when you filter the items using Ajax, click it to work.
PHP
while ($furni = $furnis->fetch_assoc()) {
echo '<img src="./web-gallery/images/furnis/small_' . $furni['image'] . '" data-id="'.$furni['id'].'" />';
}
jQuery (full: link )
success: function (e) {
$(".small_items").html('');
for (var i = 0; i < e.array.length; i++) {
$(".small_items").append('<img src="./web-gallery/images/furnis/small_' + e.array[i].image + '" data-id="' + e.array[i].id + '" />');
}
}