shortcode attrs as vars in javascript?
-
Using version 2.3.0 of the plugin. I can access my shortcode attributes as variables in custom php code, but they dont seem to expand in custom javascript code the same way. For example, I have a custom attr “foo”. In my custom php code I can access the value for “foo” using $foo. However, when I use $foo in my custom javascript, it just prints a literal “$foo” into the resulting html. I tried using {foo} as well, but it also just printed a literal “{foo}”.
Is there any way I can refer to the value of a shortcode attr in my custom javascript? Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘shortcode attrs as vars in javascript?’ is closed to new replies.