This question already has an answer here:
- jQuery $(this) keyword 5 answers
I want any text on the site to change to 'Ok!' when I click on it.
I guess such a code:
if($('*').text() != ''){
$(this).click(function() {
$(this).text() = 'Ok!';
});
}


Aucun commentaire:
Enregistrer un commentaire