lundi 6 janvier 2020

How to change the text when click on it? [duplicate]

This question already has an answer here:

I want any text on the site to change to 'Ok!' when I click on it.

enter image description here enter image description here

I guess such a code:

if($('*').text() != ''){
    $(this).click(function() {
        $(this).text() = 'Ok!';
    });
}



Aucun commentaire:

Enregistrer un commentaire