Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to embed a javascript/jquery file in ExpressionEngine?

I need to embed jquery files in ExpressionEngine.

I have created the template js under the main site template group.

I know that the css is embedding with the following tag:

<link rel="stylesheet" href="{stylesheet=template_group/template}" type="text/css" media="screen" />

for css its {stylesheet=template_group/template}

I want to know what is the tag for embedding js files

<script src=" [-->> ?? <<--] " type="text/javascript"></script>
like image 801
Ibn Saeed Avatar asked Feb 24 '23 23:02

Ibn Saeed


1 Answers

Just make sure that your template containing your javascript is of the "JavaScript" type, and link it using the standard path syntax:

<script src="{path="scripts/myscript"}" type="text/javascript"></script>

like image 193
Derek Hogue Avatar answered Mar 08 '23 06:03

Derek Hogue