assetflow/static/js/handleSidebarTriangles.js

19 lines
662 B
JavaScript
Raw Normal View History

2023-05-15 00:21:53 +02:00
const trinagles = $('.dropdownIndicator');
//const containers = $('');
trinagles.each(function () {
var target = $(this.dataset.refTarget);
target.on('show.bs.collapse', function () {
//$(this).parent.addClass('rotate');
2023-05-16 22:58:08 +02:00
$(this).parent().find('.dropdownIndicator').addClass('rotate');
console.log($(this).parent().find('.dropdownIndicator'));
2023-05-15 00:21:53 +02:00
console.log('show');
});
target.on('hide.bs.collapse', function () {
//$(this).parent.removeClass('rotate');
2023-05-16 22:58:08 +02:00
$(this).parent().find('.dropdownIndicator').removeClass('rotate');
2023-05-15 00:21:53 +02:00
console.log('hide');
});
// bootstrap.Collapse.getOrCreateInstance(document.querySelector(this.dataset.refTarget))
});