I am new in Symfony2 framework and not fully understand how to work with javascripts and how to include theirs in the best way.
What I need: to include jQuery script to each page.
What I have: I have common layout like this:
<!DOCTYPE html>
<html>
<head>
{% block javascripts %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>
Where jquery.js should be placed. What about web/bundles/jquery? Or there are some special official jquery bundles? Should I use asset() and how?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…