diff --git a/_includes/adding-removing.html b/_includes/adding-removing.html index 14963ed..2dcb768 100644 --- a/_includes/adding-removing.html +++ b/_includes/adding-removing.html @@ -2,16 +2,20 @@

You can add and remove elements from shuffle after it has been created. This also works for infinite scrolling.

Add a collection

-
// Adds 2 <div>s to an existing Shuffle instance.
+
+
// Adds 2 <div>s to an existing Shuffle instance.
 var $item1 = $('<div class="gallery-item item1">')
 var $item2 = $('<div class="gallery-item item2">')
 var $items = $item1.add($item2);
 $('#my-shuffle').append($items);
 $('#my-shuffle').shuffle('appended', $items);
+

Remove a collection

-
// Remove the 2 <div>s which were just added.
+
+
// Remove the 2 <div>s which were just added.
 var $items = $('.gallery-item');
 $('#my-shuffle').shuffle('remove', $items);
+
diff --git a/_includes/advanced-filters.html b/_includes/advanced-filters.html index a1edff7..3a9bbcc 100644 --- a/_includes/advanced-filters.html +++ b/_includes/advanced-filters.html @@ -3,13 +3,16 @@

By passing a function to shuffle, you can customize the filtering to your hearts content. Shuffle will iterate over each item and give your function the element wrapped in jQuery and the shuffle instance. Return true to keep the element or false to hide it.

Example

-
// Filters elements with a data-title attribute with less than 10 characters
+
+
// Filters elements with a data-title attribute with less than 10 characters
 $('#grid').shuffle('shuffle', function($el, shuffle) {
   return $el.data('title').length < 10;
 });
+

Searching

-
// Advanced filtering
+
+
// Advanced filtering
 $('.js-shuffle-search').on('keyup change', function() {
   var val = this.value.toLowerCase();
   $grid.shuffle('shuffle', function($el, shuffle) {
@@ -23,5 +26,6 @@ $('.js-shuffle-search').on('keyup change', function() {
     return text.indexOf(val) !== -1;
   });
 });
+
diff --git a/_includes/credit-jake.html b/_includes/credit-jake.html index 8d73f36..fafd5a9 100644 --- a/_includes/credit-jake.html +++ b/_includes/credit-jake.html @@ -1,5 +1,5 @@ diff --git a/_includes/demo-list.html b/_includes/demo-list.html index d0b4c77..b26801b 100644 --- a/_includes/demo-list.html +++ b/_includes/demo-list.html @@ -1,6 +1,6 @@ -
+
{% for post in site.demos %} -
+
diff --git a/_includes/events.html b/_includes/events.html index c62c7f2..64dfa06 100644 --- a/_includes/events.html +++ b/_includes/events.html @@ -8,17 +8,21 @@

Get notified when shuffle is done with setup

-
$grid.on('done.shuffle', function() {
+
+
$grid.on('done.shuffle', function() {
   console.log('Finished initializing shuffle!');
 });
 
 // Initialize shuffle
 $grid.shuffle( options );
+

Do something when an item is removed

-
$grid.on('removed.shuffle', function( evt, $collection, shuffle ) {
+
+
$grid.on('removed.shuffle', function( evt, $collection, shuffle ) {
   console.log( this, evt, $collection, shuffle );
 });
+
diff --git a/_includes/head.html b/_includes/head.html index bae700f..6c5b0ad 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,5 +1,5 @@ - + {{ page.title }} diff --git a/_includes/nav.html b/_includes/nav.html index e8cdf85..0df131e 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -2,20 +2,20 @@