You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
473 B

10 years ago
$(function() {
$('.component-demos .icon-all').on('click', function() {
slideToggleCode('.code-box');
});
$('.code-box').each(function(i, item) {
item = $(item);
item.find('.highlight').appendTo(item);
});
$('.code-boxes').on('click', '.collapse', function() {
slideToggleCode($(this).parent().parent());
});
10 years ago
function slideToggleCode(item) {
$(item).find('.highlight').slideToggle(150);
10 years ago
item.toggleClass('code-box-expand');
}
10 years ago
});