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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -