Skip to content

Instantly share code, notes, and snippets.

@newswim
Created July 14, 2015 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save newswim/ca08959ddf195a454765 to your computer and use it in GitHub Desktop.
Save newswim/ca08959ddf195a454765 to your computer and use it in GitHub Desktop.
<!-- Grid Wall Init -->
<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/freewall.js"></script>
<script>
$(function() {
$(".filter-label").click(function() {
$(".filter-label").removeClass("active");
var filter = $(this).addClass('active').data('filter');
if (filter) {
wall.filter(filter);
} else {
wall.unFilter();
}
});
})
var wall;
// $(function() {
// wall = new freewall("#grid-wall");
//
// wall.reset({
// selector: '.item',
// animate: true,
// cellW: function(width) {
// var cellWidth = width / 3;
// return cellWidth ;
// },
// cellH: 'auto',
// gutterY: 0,
// gutterX: 0,
// fixSize: 0,
// onResize: function() {
// wall.fitWidth()
// }
// })//.refresh();
// $("#grid-wall").html()
//wall.html();
// wall.fitWidth();
// for scroll bar appear;
//$(window).trigger("resize");
//setTimeout(function(){
// wall.fitWidth();
//}, 1000)
/*
wall.container.find('.item img').load(function() {
wall.fitWidth();
}); */
// wall.filter(".size23");
// })
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment