I'm creating If
's so I do not lose the habit of using them, but when trying something a little different than what I usually do, an error occurs, if
does not work. How can I fix it? I tried the following modes:
if($('.carousel-indicators li.active').data('slide-to').val() = 0){
console.log('Teste');
};
ERRO : Uncaught ReferenceError: Invalid left-hand side in assignment
and
if($('.carousel-indicators li.active').data('slide-to') = 0){
console.log('Teste');
};
ERRO : Uncaught TypeError: $(...).data(...).val is not a function