3
How do I check when a class is removed by the jquery developer tool?
3
How do I check when a class is removed by the jquery developer tool?
2
I wouldn’t advise it, but follow the code
$(function(){
var repetirEmMiliSegundos = 10000;//10 segundos
setInterval(function() {
if($('.nomeDaClasse').length > 0){
//Ainda existe
}
}, repetirEmMiliSegundos);
});
Just run a js in "background".
http://paulohdsousa.blogspot.com.br/2015/08/dica-como-rodar-javascript-em-background.html
+1 I just didn’t understand why of setInterval() but $(<selector>). length I make equal use explained
@Sneeps Ninja Repeat a code in X times that you specify http://www.w3schools.com/jsref/met_win_setinterval.asp
rsrsr yes, I meant in that case. But as the AP did not detail much or put a piece of code remains open this type of interpretation, I had not understood the need for a repetition to solve this case, only this :D
Browser other questions tagged jquery
You are not signed in. Login or sign up in order to post.
What do you mean? Want to check on the console if an element has a certain class? If you want to see on the console you can do
document.querySelector('#meuElemento').classList
and that gives you an array. That’s what you’re looking for?– Sergio
So in my case I had a login screen and when the user informed the password would appear a modal for him to change the password if he did not comply with the rule, but if the user had programming knowledge he could make the modal disappear and access the system normally. I solved that problem with back-end .
– Al Unser Albuquerque