0

What is the correct procedure to install jquery in my project symfony2. It is necesary create a new bundle and install there?

0

1 Answer 1

1

a best practice is to keep all your assets in the Symfony/web directory. I would create a js folder in the web directory and simply copy your jquery.js file into the js folder. Then when you want to include the script in your twig template, all you need to do is

<script src="{{ asset('js/jquery.js') }}" type="text/javascript"></script>

There are many ways to manage your assets, for more info, see the Symfony docs for managing assets

Sign up to request clarification or add additional context in comments.

1 Comment

I did it. But I can not get a result in my template...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.