Jump to content

Recommended Posts

Posted

i have searched the docs but no answer for this question

 

i have a js file in the module view directory .

 

how i can add it to the header section or add it to the end of body ?

 

fo css i found a tips with blestaSetHeadTag . i have tried to convert it but not working

$(this).blestaSetHeadTag("script", {type:"text/javascript",  href: "<?php echo $this->Html->safe($this->view_dir . "js/my.js");?>"});

 

Posted

i have missed the src instead of href

 

 

 

$(this).blestaSetHeadTag("script", {type:"text/javascript",  src: "<?php echo $this->Html->safe($this->view_dir . "js/my.js");?>"});

 

working now

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...