What are the side effects (if any) of multiple $(document).ready() in an HTML page?

后端 未结 3 1346
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-20 15:04

I am using a web application framework (Symfony 1.3.6), which follows the MVC pattern.

The view layer is comprised of a template decorator. The template file may also in

3条回答
  •  生来不讨喜
    2021-02-20 15:40

    If you want to reuse js code snippets on different pages, you can use the view.yml config file in each of your modules like this:

    firstActionSuccess:
      javascripts: [js1.js, js2.js]
    secondActionError:
      javascripts: [js1.js, js3.js]
    

提交回复
热议问题