function buildListButtons(item, addToggle) {
  var div = document.createElement('div');
  var btn1 = document.createElement('button');
  var btn2 = document.createElement('button');
  var title = document.createTextNode(item.innerText);
  var section = '"#'+item.id+'"';

  div.setAttribute('class', 'sn-buttons');
  btn1.setAttribute('class', 'sn-btn1');
  btn1.appendChild(title)
  btn2.setAttribute('class', 'sn-btn2');

  if (addToggle) {
    var i = document.createElement('i');

    i.setAttribute('class',openIcon);
    btn2.appendChild(i);
    btn2.setAttribute('onclick', 'openNav(this, true)');
  } else {
    btn2.setAttribute('disabled', '_self')
  }

  btn1.setAttribute('onclick', 'jumpToSection(this,'+section+')');
  div.appendChild(btn2);
  div.appendChild(btn1);

  return div;
}
// addToggle: boolean stating whether to add toggle sublist functionality
boolean stating whether to add toggle sublist functionality
boolean stating whether to add toggle sublist functionality
function buildListButtons(item, addToggle) {
  var div = document.createElement('div');
  var btn1 = document.createElement('button');
  var btn2 = document.createElement('button');
  var title = document.createTextNode(item.innerText);
  var section = '"#'+item.id+'"';
  div.setAttribute('class', 'sn-buttons');
  btn1.setAttribute('class', 'sn-btn1');
  btn1.appendChild(title)
  btn2.setAttribute('class', 'sn-btn2');
  if (addToggle) {
    var i = document.createElement('i');
    i.setAttribute('class',openIcon);
    btn2.appendChild(i);
    btn2.setAttribute('onclick', 'openNav(this, true)');
  } else {
    btn2.setAttribute('disabled', '_self')
  }
  btn1.setAttribute('onclick', 'jumpToSection(this,'+section+')');
  div.appendChild(btn2);
  div.appendChild(btn1);
  return div;
}
function buildListButtons ( item , addToggle ) { var div = document . createElement ( 'div' ) ; var btn1 = document . createElement ( 'button' ) ; var btn2 = document . createElement ( 'button' ) ; var title = document . createTextNode ( item . innerText ) ; var section = '"#' + item . id + '"' ; div . setAttribute ( 'class' , 'sn-buttons' ) ; btn1 . setAttribute ( 'class' , 'sn-btn1' ) ; btn1 . appendChild ( title ) btn2 . setAttribute ( 'class' , 'sn-btn2' ) ; if ( addToggle ) { var i = document . createElement ( 'i' ) ; i . setAttribute ( 'class' , openIcon ) ; btn2 . appendChild ( i ) ; btn2 . setAttribute ( 'onclick' , 'openNav(this, true)' ) ; } else { btn2 . setAttribute ( 'disabled' , '_self' ) } btn1 . setAttribute ( 'onclick' , 'jumpToSection(this,' + section + ')' ) ; div . appendChild ( btn2 ) ; div . appendChild ( btn1 ) ; return div ; }
addToggle: boolean stating whether to add toggle sublist functionality
addToggle : boolean stating whether to add toggle sublist functionality