Accordion with plus/minus icon

Regarding: bootsnipp.com/snippets/3kB4m

$(document).ready(function(){

function toggleIcon(e) {

$(e.target)

.prev('.panel-heading')

.find(".more-less")

.toggleClass('glyphicon-plus glyphicon-minus');

}

$('.panel-group').on('hidden.bs.collapse', toggleIcon);

$('.panel-group').on('shown.bs.collapse', toggleIcon);

});

works like a charm

Davidb () - 3 weeks ago - Reply 0