I am currently coding in Javascript, without utilizing jQuery.
Progress so far on the accordion title panel:
var accordion = document.createElement('div');
accordion.className = 'panel-group';
accordion.id = 'accordion';
document.getElementById('navgroupsframe').appendChild(accordion);
var panel = document.createElement('div');
panel.className = 'panel';
panel.style.marginLeft = '-15px';
accordion.appendChild(panel);
var panelheading = document.createElement('div');
panelheading.className = 'panel-heading';
panel.appendChild(panelheading);
var paneltitle = document.createElement('div');
paneltitle.className = 'vgroupholder panel-title'
Goal is to achieve this structure:
<div class="panel-group" id="accordion">
<div class="panel" style="margin-left: -15px;">
<div class="panel-heading">
<div class="vgroupholder panel-title" data-parent="#accordion" data-toggle="collapse" href="#title1" onclick="removevBgs();">
How can I accomplish this task? (including data-parent
, etc. using only pure Javascript, without relying on jQuery).
Appreciate any assistance.