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.
|
|
|
$(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());
|
|
|
|
});
|
|
|
|
|
|
|
|
function slideToggleCode(item) {
|
|
|
|
$(item).find('.highlight').slideToggle(150);
|
|
|
|
item.toggleClass('code-box-expand');
|
|
|
|
}
|
|
|
|
});
|