const options = document.querySelectorAll('#id_active > option');
options[0].innerHTML = 'Да1';
options[1].innerHTML = 'Нет1';
const openedEye = 'M8 1.488c-5.302 0-8 5.21-8 6.512 0 1.302 2.791 6.512 8 6.512S16 9.302 16 8c0-1.302-2.698-6.512-8-6.512zm0 10.233A3.731 3.731 0 014.279 8 3.731 3.731 0 018 4.279 3.731 3.731 0 0111.721 8 3.731 3.731 0 018 11.721zM8 6c1.143 0 2 .953 2 2 0 1.143-.952 2-2 2-1.143 0-2-.952-2-2 0-1.142.857-2 2-2z';
var el = document.querySelector('body'); <!-- не html, а body --->
const xmlns = "http://www.w3.org/2000/svg";
const toggleContainer = document.createElement('div');
toggleContainer.classList.add('_toggle');
el.append(toggleContainer);
// svg
const svgEl = document.createElementNS(xmlns, 'svg');
svgEl.setAttribute('width', '16');
svgEl.setAttribute('height', '16');
svgEl.setAttribute('viewBox', '0 0 16 16');
toggleContainer.append(svgEl);
// path
const pathEl = document.createElementNS(xmlns, "path"); <!-- path тоже NameSpace-->
pathEl.setAttribute('fill-rule', 'evenodd');
pathEl.setAttribute('d', openedEye);
svgEl.append(pathEl);
const types = { /* ключ : ' что выводить' - отредактируйте сами*/
'undefined': 'undefined',
'object': 'object/oser',
'boolean': 'bool',
'number': 'number',
'string': 'string',
'symbol': 'symbol',
'function': 'func',
}
let current_type = i12.value; // значение input
if (typeof types[typeof current_type] !== "undefined") { // если существует такой ключ в объекте, то
div12.innerHTML = types[typeof i12]+''; // выводим в блоке div12
}else{ // иначе
div12.innerHTML = ''; // очищаем блок div12 - value = ""
}
tinymce.init({
selector: 'textarea', // change this value according to your HTML
auto_focus: 'element1'
});
<div class="out"></div>
<!-- пустой div для вывода данных-->
// в скобках JSON.parse() ответ сервера json
const answer = JSON.parse('[{"conf":{"type":"text","tech_type":"js","parser":"jq","comm1":"5mr","comm2":"priv","name":"Petr","f_name":"Ivanov","enable":"no"}}]')[0].conf;
const out = document.querySelector('.out'); // находим div
out.innerHTML =''; // очищаем его
for (key in answer) { //перебираем объект
out.innerHTML += '<div id="'+key+'">'+answer[key]+'</div>'; добавляем внутрь out
}
<li data-filter="">
<li data-target="">
$("#grid-filter li").click(function() {
var group = $(this).data('target');
var group_class = "." + group; // БЫЛО по классу (переменную назовите group_attr чтоб не вспоминать через год)
var selector = '[data-filter~="' + group + '"]'; // по атрибуту - (меньше селектор = меньше проверок)