picnictutorials — 2013-03-22T07:10:45-04:00 — #1
Whenever I can i of course combine multiple script tags into one. Is there any way to do that (aside from docwrite) if each one needs a wrapping div?
davemaxwell — 2013-03-22T15:21:18-04:00 — #2
Why would you need a div for a script tag? They aren't displayable...... :shifty:
picnictutorials — 2013-03-22T15:24:43-04:00 — #3
Two reasons. I floating 2 left. And to give it a height while JS is on so it doesn't load like **** like sitepoint. The space is preserved.
davemaxwell — 2013-03-22T15:31:06-04:00 — #4
Again, scripts are not displayed.
If you need the space, then fine, handle that through css. But wrapping scripts in divs don't gain you anything.....
felgall — 2013-03-22T17:01:33-04:00 — #5
Just put all the script tags just before the </body> tag. If the scripts are so antiquated that they don't work when placed there then either update the script or replace it with a more modern one that works properly with modern browsers - the scripts that need to go earlier in the page are written for Netscape 4 and earlier.
picnictutorials — 2013-03-22T19:18:28-04:00 — #6
They are adsense blocks. So they also have a large external script with each. Same script (link at least) but I can't just say it once - stupid. So they load exactly where they are placed. I can probably get away without the wrapping divs. just means I have to make sense of the convoluted code and find the correct id to target.
I need to test this. But the adsense JS is very slow to load. So I thought I would wrap with the div to preserve the space to keep things from moving around once it loads.
felgall — 2013-03-22T20:15:55-04:00 — #7