How to include a certain javascript file after <body> tag -
i'm getting error typeerror: document.body null
in javascript.
and solution found here. problem how can load specific javascript file(where error come from) after <body>
? or add window.onload = function()
file?
and especially, how tell path of javascript file app?
i know how include every file application.js
, trigger before <body>
load
since mention application.js
assume you're using rails? in case, use javascript_include_tag
include file in application.html.erb
before closing </body>
tag.
Comments
Post a Comment