Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
sidebar article with slow javascript
hey smart folks, I’m wondering if you have any suggestions for me.
I have a sidebar poll widget that is slowing down the loading of my site. It calls a thirdparty javascript. Ordinarily, I would put the <script src="..." ></script>
at the bottom of my page before </body>
. This would be easy if I displayed the poll as a single article. But as a homepage sidebar element, I’m not sure if that’s possible.
I don’t want to hardcode the script to be called in <body onload="" >
because this poll isn’t a permanent thing.
Is there a way my page template can sniff out and grab the custom field of an article generated from article_custom list and put it somewhere else on the page?
Or, is there way <script src="" ></script>
can be asked to wait for the body to be done loading?
thanks for any and all suggestions…
Offline
Re: sidebar article with slow javascript
Might be a use case for WEDJE.
Offline
#3 2007-08-04 10:26:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: sidebar article with slow javascript
Make use of the defer attribute.
Offline