D
D
Dmitry Sokolov2016-07-27 10:05:53
Angular
Dmitry Sokolov, 2016-07-27 10:05:53

Why is the class not added to the element when using addClass?

Good afternoon! Please tell me how to solve the problem.
I use this code:

var flID = '#preview' + $num;
var elemFL = angular.element(document.querySelector(flID));
elemFL.addClass('arrow_top');
console.log(elemFL);

Judging by the console, the class "arrow_top" was added to the element
[div#preview1.arrow_top]
but it is not in the page code.
<div id="preview0" class="">
Why is this happening?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
_
_ _, 2016-07-27
@AMar4enko

Ну и еще вы разные элементы смотрите

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question