Using a javascript document prepared twice in one document?

I have a headline on my webpage containing some javascript for some jquery plugins that I use. These plugins are used on a bunch of pages, so I just include them in the heading document, which is included in each of my pages.

There is one page, however, I would like to include another javascript, but it is needed only on this page. Can I use the document ready function a second time on the same page or is it in poor shape?

I do not want to include javascript on every page, because it is not needed and will be a waste to load on every page.

+5
source share
4 answers
+8

, . , .

+3

, , :

  • .
  • . , , , .

: , $(document).ready(, , , . - .

Erm, and it has been reviewed here before. More than once. Me. How embarrassing :)

+2
source

All Articles