How to send values from form.php to view.js?
PermalinkInstall like this:
<script type="text/javascript"> Macy.init({ container: '#macy-container', margin: 12, columns: 3, } }); </script>
If i install the script inside view.php it wont work. Get error:
"1087 Uncaught ReferenceError: Macy is not defined(…)"
Attach them to a dom element as data attribute data-whatever="value", either individually or as a json string. Then in your js, look for the attribute and get the values from it.