Need help with javascript. Fairly basic stuff I believe.
Posted: Fri Aug 17, 2007 2:55 pm
Ok. I'm gonna try and make sense here.
I've just hacked my template to include digg/reddit buttons on each entry.
Check http://www.hastalasiesta.org to see what I'm on about.
My one concern is that the Javascript in the buttons make the page pause for a moment while loading. The solution I have in mind is to delay the loading of the buttons until the rest of the page has loaded.
Now; I know there's a body.onload solution that is in the neighbourhood of what I'd like to achieve, but as far as I know this command needs to write to a specific ID on the page. Since there are multiple div's with buttons I can hardly use ID's rather than Classes.
If anyone could help me out with this (preferably with a comprehensible code example as I'm not too hot on JavaScript.) I'd be very grateful.
-m[/url]
I've just hacked my template to include digg/reddit buttons on each entry.
Check http://www.hastalasiesta.org to see what I'm on about.
My one concern is that the Javascript in the buttons make the page pause for a moment while loading. The solution I have in mind is to delay the loading of the buttons until the rest of the page has loaded.
Now; I know there's a body.onload solution that is in the neighbourhood of what I'd like to achieve, but as far as I know this command needs to write to a specific ID on the page. Since there are multiple div's with buttons I can hardly use ID's rather than Classes.
If anyone could help me out with this (preferably with a comprehensible code example as I'm not too hot on JavaScript.) I'd be very grateful.
-m[/url]