I want to go to url on an element click event, here is my code :
$('#job').click(function() {
window.location.href = "<?php echo $this->createUrl('jobs/view');?>";
});
but the url is loaded as http://mysite/<?php echo $this->createUrl('jobs/view');?>
instead of http://mysite/jobs/view
, so the php script didn't run, how I can solve this problem ?