From 4fb9583880694ff6e29c4df7d7b6cdd701bddb67 Mon Sep 17 00:00:00 2001 From: David DeSandro Date: Tue, 18 Mar 2014 07:47:06 -0400 Subject: [PATCH] masonry example fixes for IE8 --- examples/masonry.html | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/examples/masonry.html b/examples/masonry.html index 87692d3..7d164cd 100644 --- a/examples/masonry.html +++ b/examples/masonry.html @@ -26,14 +26,12 @@

Sort

- + + + + +
@@ -174,7 +172,7 @@ docReady( function() { masonry: { columnWidth: 90 }, - // itemSelector: '.element', + itemSelector: '.element', stamp: '.stamp', getSortData: { @@ -194,16 +192,11 @@ docReady( function() { var options = document.querySelector('#options'); eventie.bind( options, 'click', function( event ) { - if ( !matchesSelector( event.target, 'a' ) ) { + if ( !matchesSelector( event.target, 'button' ) ) { return; } - - // use link's href, remove leading hash - var sortBy = event.target.getAttribute('href').slice( 1 ); - sortBy.slice( 0, 1 ); - iso.options.sortBy = sortBy; - iso.arrange(); - event.preventDefault(); + var sortBy = event.target.getAttribute('data-sort-by'); + iso.arrange({ sortBy: sortBy }); }); });