I need help inserting something llike a delay between executing that "code()".For example I want it to execute one after another every 4 seconds.So like first one executes, that after 4 seconds the code executes again and so on for each of the elements with given class.
Im also using .this in that "code()" so I need it to stay there because for example im getting the id of every given class and using that.
var myFunction = function(){
$(".someClass").each( function(){
if( this.style.opacity != "0.5" ){
code();
}
});
};