I have a JavaScript code and there is one function that I want to add two class to it , but if I add them in the same function line the other class don't work , and when I write each one in the same function but different lines the second class works only , all what I want here is add the first class and add the second class after like 5sec ? I don't know if there is any way to make it work but I hope there is .
this is when the first class only works :
function open() {
en.addClass('op').addClass('bo-ac')
.removeClass('cl');
}
this is when the second class only works :
function open() {
en.addClass('op')
.removeClass('cl');
}
function open() {
$('.bo').addClass('bo-ac')
}
open()function declarations, so the second one overwrites the first one.