I have a universal snippet for some js code within a <script> tag. It is essentially:
If I put
I want to make the config an attribute so I have changed the snippet to
, and added an attribute of
and the shortcode in the webpage to
This does not work and the message is
I have got this sort of thing working fine with php snippets. There is probably some simple thing about the universal snippet I am not understanding.
Thanks for a great plugin.
HTML:
<script>new juicebox({configUrl : 'Jbox-D01992.xml'})</script>
[wbcr_snippet id="4883"]
in my webpage it works fine.I want to make the config an attribute so I have changed the snippet to
HTML:
<script>new juicebox({configUrl : 'Jbox-' + $jboxid + '.xml'})</script>
jboxid
and the shortcode in the webpage to
[wbcr_snippet id="4883" jboxid="D01992"]
This does not work and the message is
Uncaught ReferenceError: $jboxid is not defined
I have got this sort of thing working fine with php snippets. There is probably some simple thing about the universal snippet I am not understanding.
Thanks for a great plugin.