I have come across this html code and I am attempting to assign a new class to it using the data attribute:
<p class="form-row form-row-wide" data-child-field="child_has_jacket">
</p>
Even after trying with jQuery :
jQuery(document).ready(function( $ ){
$('.form-row [data-child-field='child_has_jacket']').addClass("selected");
});
Unfortunately, it doesn't seem to be working as expected. Any suggestions?