Home › Forums › JavaScript › Javascript styling for a specific url › Re: Javascript styling for a specific url
July 12, 2012 at 7:32 am
#105925
Participant
Sorry to respond to this so late, but I would just like to suggest that scripts within the body should always be placed after any elements being affected by them. This should allow the element(s) to load first and ensure that the script won’t attempt to operate on something that doesn’t yet exist. (Most likely this was the problem you had with my script.)
Right before the body closing tag, </body>, (if possible) is the safest place.