Page 1 of 1

Need help with javascript. Fairly basic stuff I believe.

Posted: Fri Aug 17, 2007 2:55 pm
by Martin
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]

Re: Need help with javascript. Fairly basic stuff I believe.

Posted: Fri Aug 17, 2007 3:36 pm
by garvinhicking
Hi!

Hm, you might need to ask this in a javascript-forum, there might be more people who can help you with that.

I beliefe in IE the '<script ... defer>' does what you want.

HTH,
Garvin

Posted: Fri Aug 17, 2007 5:04 pm
by Martin
@garv: I just assume that the codemonkeys of the world are to be found here. ;)