Requirements
Examples
Installation
Add three lines to the HEAD of the page:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery-photowall.js"></script>
<link rel="stylesheet" type="text/css" href="jquery-photowall.css">"
Add this to page code:
<div id="gallery">
<div class="body">
</div>
</div>
Initialize plugin on page load and load data:
<script type="text/javascript">
$(document).ready(function(){
PhotoWall.init({
el: '#gallery'
,zoom: true
,zoomAction: 'mouseenter'
,zoomTimeout: 500
,zoomDuration: 100
,zoomImageBorder: 5
,showBox: true
,showBoxSocial: true
,padding: 5
,lineMaxHeight: 150
,lineMaxHeightDynamic: false
,baseScreenHeight: 600
});
$.ajax({
url: 'https://picasaweb.google.com/data/feed/api/user/118283508237214694671/albumid/5685978516288199793'
+'/?alt=json&fields=entry(gphoto:id,title,media:group(media:thumbnail,media:'
+'content))&imgmax=720',
dataType: 'jsonp',
success: function(data){
var photos = {}
if(!data.feed.entry) return;
for(var i in data.feed.entry) {
var e = data.feed.entry[i].media$group;
var id = data.feed.entry[i].gphoto$id.$t;
var t1h = e.media$thumbnail[2].height;
var t1w = e.media$thumbnail[2].width;
var t1src = e.media$thumbnail[2].url
var t2w = Math.round(t1w * 1.5);
var t2h = Math.round(t1h * 1.5);
var t2src = e.media$content[0].url+'/../../w'+t2w+'-h'+t2h+'/';
var bsrc = e.media$content[0].url;
var bw = e.media$content[0].width;
var bh = e.media$content[0].height;
photos[id] = {id:id,img:bsrc,width:bw,height:bh,
th:{src:t1src,width:t1w,height:t1h,
zoom_src:t2src,zoom_factor:1.5
}
};
}
PhotoWall.load(photos);
}
});
});
</script>