Answer the question
In order to leave comments, you need to log in
How can I make the text change when the checkbox is clicked?
I can't figure out what is wrong in my code.
https://jsfiddle.net/bsx72uj5/
Answer the question
In order to leave comments, you need to log in
Add jQuery to the resources and everything will work
well, and you can use a more concise solution:
$('#subscribeNews').click(function() {
$('.rememberMe').text($(this).is(':checked') && 'новый текст' || 'напомнить мне');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question