VE-1996: Create JS to toggle pi-collapse-closed class

This commit is contained in:
Paul Oslund 2015-10-26 22:18:28 +00:00
parent 2faa1bd633
commit af4026b386

View file

@ -27,5 +27,21 @@
}
};
var CollapsibleGroup = {
init: function() {
var $collapsibleGroups = $('.pi-collapse');
$collapsibleGroups.each( function( index, group ) {
var $group = $collapsibleGroups.eq(index),
$header = $group.find('.pi-header');
$header.click( function() {
$group.toggleClass('pi-collapse-closed');
});
});
}
}
ImageCollection.init();
CollapsibleGroup.init();
})(window, jQuery);