I'm trying to add a class to an existing div that has multiple classes but doesn't work, the class is not added. I've added this on header (it's s shopify template):
<script type="text/javascript">
jQuery(document).ready(function($) {
$('div.wk_right_header_inner wk_font_weight_bold wk_font_family wk_paddingbottom10').addClass('new-class');
});
</script>
The div looks like this (with no space after <):
<div class="wk_right_header_inner wk_font_weight_bold wk_font_family
wk_paddingbottom10"> Test </div>
Thanks
$('div.wk_right_header_inner').addClass('new-class'); });is quite enough.addClassto that. Like:$('div .wk_right_header_inner').addClass('new-class');$('#id').addClass('new-class')?