I am having trouble with some jQuery code. Although I am fairly proficient in JavaScript my understanding of jQuery is limited.
I was hoping someone could go through the following code with me to convert it to JavaScript or pseudo code so I can convert it in to JavaScript.
if (someVar !== 1000) {
$(element).appendTo('#someID').delay(someVar * 1000).queue(function() {
$(this).removeClass(someClass).addClass(someOtherClass).delay(1000).queue(function() {
$(this).remove()
}).dequeue();
});
}
My break down is append $(element) to #someID after a period of time. Then remove someClass and add someOtherClass to this event after some time then remove this event and dequeue.
I just don't understand the syntax. I am going to learn but at the moment I need to either understand what the above is saying so I can convert to JavaScript, or get some quick help converting it to JavaScript.
I have looked at a couple of sites in regards to converting jQuery to JavaScript but I am still stuck.
delay().queue()pattern is doing is executing some logic after an specified time. You can convert that tosetTimeout()