Very simple question:
Is it possible to display a var in .html, using jQuery?
var inscr = '<?php echo "test"; ?>';
$j('#myPlaceHolder7').html('<li class="button3">+inscr</li>');
Thanks!
Thanks everyone for the quick help!
<script>
var inscr = <?php echo json_encode("test"); ?>;
$j('#myPlaceHolder7').html('<li class="button3">'+inscr+'</li>');
</script>
Results in this source:
<script>
var inscr = "test";
$j('#myPlaceHolder7').html('<li class="button3">'+inscr+'</li>');
</script>
See json_encode()