@ -4,11 +4,11 @@ layout: default
category: demos
category: demos
---
---
< section id = "copy" >
< section id = "copy" >
< p > < a href = "http://benalman.com/projects/jquery-bbq-plugin/" > jQuery BBQ< / a > by Ben Alman allows you to use hash history to save Isotope options. Try clicking a couple options then hitting the back button, or copying the URL and pasting it into a new window.< / p >
< p > < a href = "http://benalman.com/projects/jquery-bbq-plugin/" > jQuery BBQ< / a > by Ben Alman allows you to use hash history to save Isotope options. Try clicking a couple options then hitting the back button, or copying the URL and pasting it into a new window.< / p >
< / section >
< / section >
< section id = "options" class = "clearfix" >
< section id = "options" class = "clearfix" >
< h3 > Filters< / h3 >
< h3 > Filters< / h3 >
@ -51,20 +51,20 @@ category: demos
< li > < a href = "#layoutMode=straightDown" > straightDown< / a > < / li >
< li > < a href = "#layoutMode=straightDown" > straightDown< / a > < / li >
< / ul >
< / ul >
< / section > <!-- #options -->
< / section > <!-- #options -->
< div id = "container" class = "variable-sizes clearfix" >
< div id = "container" class = "variable-sizes clearfix" >
{% for elem_number in site.random_order | limit:60 %}
{% for elem_number in site.random_order | limit:60 %}
{% assign element = site.elements[elem_number] %}
{% assign element = site.elements[elem_number] %}
{% include element-partial.html %}
{% include element-partial.html %}
{% endfor %}
{% endfor %}
< / div > <!-- #container -->
< / div > <!-- #container -->
< script src = "../{{ site.jquery_js }}" > < / script >
< script src = "../{{ site.jquery_js }}" > < / script >
< script src = "../{{ site.isotope_js }}" > < / script >
< script src = "../{{ site.isotope_js }}" > < / script >
< script src = "../js/jquery.ba-bbq.min.js" > < / script >
< script src = "../js/jquery.ba-bbq.min.js" > < / script >
< script >
< script >
$(function(){
$(function(){
var $container = $('#container'),
var $container = $('#container'),
// object that will keep track of options
// object that will keep track of options
@ -77,16 +77,7 @@ $(function(){
layoutMode: 'masonry'
layoutMode: 'masonry'
};
};
{% include random-sizes.js %}
// hacky way of adding random size classes
$container.find('.element').each(function(){
if ( Math.random() > 0.6 ) {
$(this).addClass('width2');
}
if ( Math.random() > 0.6 ) {
$(this).addClass('height2');
}
});
var setupOptions = $.extend( defaultOptions, {
var setupOptions = $.extend( defaultOptions, {
itemSelector : '.element',
itemSelector : '.element',
@ -184,7 +175,6 @@ $(function(){
// trigger hashchange to capture any hash data on init
// trigger hashchange to capture any hash data on init
.trigger('hashchange');
.trigger('hashchange');
});
});
< / script >
< / script >