Browse Source

Merge branch 'master' into gh-pages

v1
David DeSandro 14 years ago
parent
commit
62c6d040fd
  1. 14
      _includes/change-sizes.js
  2. 16
      _includes/elements-demo-foot.html
  3. 12
      _includes/option-buttons.js
  4. 2
      _posts/demos/2011-01-11-images.html
  5. 46
      _posts/demos/2011-03-29-combination-filters.html
  6. 2
      _posts/docs/2010-12-03-options.mdown
  7. 2
      _posts/docs/2010-12-10-adding-items.mdown
  8. 16
      _posts/tests/2011-05-13-jquery-animation01.html
  9. 31
      _posts/tests/2011-05-18-centered-masonry.html
  10. 21
      _posts/tests/2011-05-24-elements-complete-test.html

14
_includes/change-sizes.js

@ -0,0 +1,14 @@
// change size of clicked element
$container.delegate( '.element', 'click', function(){
$(this).toggleClass('large');
$container.isotope('reLayout');
});
// toggle variable sizes of all elements
$('#toggle-sizes').find('a').click(function(){
$container
.toggleClass('variable-sizes')
.isotope('reLayout');
return false;
});

16
_includes/elements-demo-foot.html

@ -45,16 +45,10 @@
{% include option-set-buttons.js %}
// toggle variable sizes of all elements
$('#toggle-sizes').find('a').click(function(){
$container
.toggleClass('variable-sizes')
.isotope('reLayout');
return false;
});
{% include layout-change.js %}
{% include change-sizes.js %}
{% include add-buttons.js %}
$('#shuffle a').click(function(){
@ -62,11 +56,7 @@
return false;
});
// change size of clicked element
$container.find('.element').live('click', function(){
$(this).toggleClass('large');
$container.isotope('reLayout');
});
});

12
_includes/option-buttons.js

@ -1,12 +0,0 @@
// switches selected class on buttons
$('#options').find('.option-set a').click(function(){
var $this = $(this);
// don't proceed if already selected
if ( !$this.hasClass('selected') ) {
$this.parents('.option-set').find('.selected').removeClass('selected');
$this.addClass('selected');
}
});

2
_posts/demos/2011-01-11-images.html

@ -15,7 +15,7 @@ photos:
---
<section id="copy">
<p>Isotope is triggered after all images are loaded with the <a href="../docs/troubleshooting.html#imagesloaded_plugin"><code>imagesLoaded</code> plugin</a>. </p>
<p>Isotope is triggered after all images are loaded with the <a href="../docs/help.html#imagesloaded_plugin"><code>imagesLoaded</code> plugin</a>. </p>
</section>
<div id="container" class="photos clearfix">

46
_posts/demos/2011-03-29-combination-filters.html

@ -22,10 +22,10 @@ schema:
{% for group in page.schema %}
<div class="option-combo {{ group.name }}">
<h4>{{ group.name }}</h4>
<ul class="filter option-set clearfix ">
<li><a href="#filter-{{ group.name }}-any" data-filter="" data-group="{{ group.name }}" class="selected">any</a>
<ul class="filter option-set clearfix " data-filter-group="{{ group.name }}">
<li><a href="#filter-{{ group.name }}-any" data-filter-value="" class="selected">any</a>
{% for filter in group.filters %}
<li><a href="#filter-{{ group.name }}-{{ filter }}" data-group="{{ group.name }}" data-filter=".{{ filter }}">{{ filter }}</a>
<li><a href="#filter-{{ group.name }}-{{ filter }}" data-filter-value=".{{ filter }}">{{ filter }}</a>
{% endfor %}
</ul>
</div>
@ -61,32 +61,40 @@ schema:
var $container = $('#container'),
filters = {};
$container.isotope({
itemSelector : '.color-shape',
masonry: {
columnWidth: 80
}
});
// filter buttons
$('.filter a').click(function(){
var $this = $(this),
isoFilters = [],
prop, selector;
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('selected') ) {
return;
}
var $optionSet = $this.parents('.option-set');
// change selected class
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
// store filter value in object
// i.e. filters.color = 'red'
filters[ $this.data('group') ] = $this.data('filter');
for ( prop in filters ) {
var group = $optionSet.attr('data-filter-group');
filters[ group ] = $this.attr('data-filter-value');
// convert object into array
var isoFilters = [];
for ( var prop in filters ) {
isoFilters.push( filters[ prop ] )
}
selector = isoFilters.join('');
var selector = isoFilters.join('');
$container.isotope({ filter: selector });
return false;
});
{% include option-buttons.js %}
$container.isotope({
itemSelector : '.color-shape',
masonry: {
columnWidth: 80
}
});
});
</script>

2
_posts/docs/2010-12-03-options.mdown

@ -265,7 +265,7 @@ The property name of the method within the `getSortData` option to sort item ele
<dd class="default"><code><span class="kc">true</span></code></dd>
</dl>
Isotope uses CSS3 transform to position item elements, when available in the browser. Setting `transformsEnabled` to <code><span class="kc">false</span></code> will disable this feature so all browsers use top/left absolute positioning. Useful for [resolving issues with Flash content](troubleshooting.html#flash).
Isotope uses CSS3 transform to position item elements, when available in the browser. Setting `transformsEnabled` to <code><span class="kc">false</span></code> will disable this feature so all browsers use top/left absolute positioning. Useful for [resolving issues with Flash content](help.html#flash).
### Additional CSS {#transformsEnabled-css}

2
_posts/docs/2010-12-10-adding-items.mdown

@ -43,7 +43,7 @@ The [`appended` method](methods.html#appended) is a convenience method triggers
[**See Demo: Infinite Scroll**](../demos/infinite-scroll.html).
See also [Infinite Scroll with filtering or sorting](troubleshooting.html#infinite_scroll_with_filtering_or_sorting)
See also [Infinite Scroll with filtering or sorting](help.html#infinite_scroll_with_filtering_or_sorting)
## Prepending

16
_posts/tests/2011-05-13-jquery-animation01.html

@ -75,19 +75,7 @@ category: tests
{% include option-set-buttons.js %}
// change size of clicked element
$container.find('.element').live('click', function(){
$(this).toggleClass('large');
$container.isotope('reLayout');
});
// toggle variable sizes of all elements
$('#toggle-sizes').find('a').click(function(){
$container
.toggleClass('variable-sizes')
.isotope('reLayout');
return false;
});
{% include change-sizes.js %}
});
</script>

31
_posts/tests/2011-05-18-centered-masonry.html

@ -132,33 +132,18 @@ category: tests
return $elem.find('.name').text();
}
}
});
{% include option-set-buttons.js %}
// change size of clicked element
$container.find('.element').live('click', function(){
$(this).toggleClass('large');
$container.isotope('reLayout');
});
{% include option-set-buttons.js %}
// toggle variable sizes of all elements
$('#toggle-sizes').find('a').click(function(){
$container
.toggleClass('variable-sizes')
.isotope('reLayout');
return false;
});
{% include add-buttons.js %}
{% include add-buttons.js %}
{% include change-sizes.js %}
$('#shuffle a').click(function(){
$container.isotope('shuffle');
return false;
$('#shuffle a').click(function(){
$container.isotope('shuffle');
return false;
});
});
});
</script>

21
_posts/tests/2011-05-24-elements-complete-test.html

@ -121,23 +121,9 @@ category: tests
return false;
});
{% include layout-change.js %}
// change size of clicked element
$container.find('.element').live('click', function(){
$(this).toggleClass('large');
$container.isotope('reLayout');
});
// toggle variable sizes of all elements
$('#toggle-sizes').find('a').click(function(){
$container
.toggleClass('variable-sizes')
.isotope('reLayout');
return false;
});
{% include change-sizes.js %}
{% include add-buttons.js %}
@ -146,8 +132,5 @@ category: tests
return false;
});
{% include option-buttons.js %}
});
</script>

Loading…
Cancel
Save