This JavaScript code was in a PHP file, and I need to put this JS code into a .js file.
<script>
$j(".fresh").click(function(){
$j(this).html('<span><?php echo $this->lang_arr['my_new_func']; ?></span>');
$j.post( "<?= site_url('website/func_resh') ?>",
{ id : "<?= $webfun_one_arr[id] ?>",
website_id : "<?= $web_one_arr[id] ?>"
}
);
})
</script>
I know this code <?php echo $this->lang_arr['my_new_func']; ?> in the JavaScript format is {$this->lang_arr['my_new_func'];}
But I don't know how I change <?= site_url('website/func_resh') ?> and <?= $webfun_one_arr[id] ?> into JS format.
Thanks for any answer.
<script src=tag?