I have 10 <p>tags in my html with class.rule
I want to change their text separately, without using a separate identifier, for example #rule1, #rule2, #rule3:
$('#rule1').text('Rule 1')
$('#rule2').text('Rule 2')
$('#rule3').text('Rule 3')
I just want one class to be selected in jQuery, but to edit the text of other tags <p>with the same class.
How should I do it?
source
share