Browse Source

demos : add change-sizes.js include

pull/96/head
David DeSandro 13 years ago
parent
commit
1325e2f847
  1. 14
      _includes/change-sizes.js
  2. 16
      _includes/elements-demo-foot.html
  3. 14
      _posts/tests/2011-05-13-jquery-animation01.html
  4. 21
      _posts/tests/2011-05-18-centered-masonry.html
  5. 19
      _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');
});
});

14
_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>

21
_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');
});
// 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 change-sizes.js %}
$('#shuffle a').click(function(){
$container.isotope('shuffle');
return false;
});
});
});
</script>

19
_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