I'm quite new in javascript and this problem is haunting me down since the very begining. When I get DOM element event behaves properly, but while I try to change anything (like class) it gives me "undefined is not a function".
I don't understand why, because in the same time console.log gives out
<div class="nav-about menu" id="nav-about"></div>
HTML
<div class="nav-about menu" id="nav-about"></div>
JS
var link_one = document.getElementById("nav-about");
link_one.addEventListener("click", function(){
console.log(this);
this.addClass('special');
}, false);
I couldn't find answer to that anywhere. Yes jquery to addClass is included in head tag.