How can I insert a class before another class?

The below works for jQuery, but I need it done in vanilla Js

<script>
  $(".is-widget-container-composer_name")
  document.body.insertBefore(".is-widget-container-artist_primary");
</script>

Hi @yorsite, please have a look at the signature of insertBefore() – which element are you trying to insert before which? The jQuery you posted is just an element query…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.