Is it possible to change this script to direct it's path to a folder?
<script>
$('#container').waterfall({
itemCls: 'item',
colWidth: 222,
gutterWidth: 15,
gutterHeight: 15,
checkImagesLoaded: false,
path: function(page) {
return 'data/data1.json?page=' + page;
}
});
</script>
I already have a PHP script works in finding the server folder.
<?php
$dirname = "photos/home/";
$images = scandir($dirname);
shuffle($images);
$ignore = Array(".", "..");
foreach($images as $curimg){
if(!in_array($curimg, $ignore)) {
echo "<img src='img.php?src=".$dirname.$curimg." ' />\n";
}
}
?>
Is it possible to combine both scripts together either in PHP our jquery, or both?
Thank you.
Erik