function click_category(id,i) {

  let cid = document.getElementById('category_'+id);

  //console.log(cid)

  //console.log(title)

  if (cid.classList.contains('selected')) {

    cid.classList.remove('selected');

    localstorage_update('sections',i,0);

  } else {

    cid.classList.add('selected');

    localstorage_update('sections',i,1);

  }   

}