jssor/slider

PHP Variable

dungphanxuan opened this issue · 1 comments

I set JS for PHP so php notify variable not found
image

image

So how can i update JS code

jssor commented

move script outside tag.

<script>
    var options = {$AutoPlay:1};
    var jssor1_slider = new $JssorSlider$("jssor_1", options);
</script>

or

<script>
    var options = {<?php echo '$AutoPlay'; ?>:1};
    var jssor1_slider = new $JssorSlider$("jssor_1", options);
</script>