block editor – Is it possible to add javascript to template parts

Question

Is it possible to add javascript to a template part, specifically I would like to add alpine.js to a template part. Any time I add a x-data="menuOpen" or even a data attribute I get This block contains unexpected or invalid content

Any help on this is appreciated.

0
CGTS 2 months 2023-01-31T00:49:23-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse