document.querySelectorAll()
toggle.addEventListener("click", function(event) {
event.preventDefault();
mobile.forEach((el) => {
el.classList.toggle("main-nav__item--opened");
});
});
toggle.addEventListener("click", function(event) {
event.preventDefault();
for(var i = 0; i < mobile.length; i++) {
mobile[i].classList.toggle("main-nav__item--opened");
}
});
new Article();
function Article() {
this.count = 111;
Article.count = 222;
}
conts article1 = new Article();
console.log(Article.count); // 222
console.log(article1.count); // 111
console.log(article1.__proto__.constructor.count); // 222 - вот он как глубоко
$('select').val(price);
$('select').val(price).change();
var json = [{
"key": "Apples",
"value": "4"
}, {
"key": "Pears",
"value": "7"
}, {
"key": "Bananas",
"value": "9"
}];
var processed_json = new Array();
$.map(json, function(obj, i) {
processed_json.push([obj.key, parseInt(obj.value)]);
});
if (processed_json.length != 0) {
loadJson();
}
function loadJson() {
$('#container').highcharts({
chart: {
type: 'column'
},
xAxis: {
type: "category"
},
series: [{
data: processed_json
}]
});
}