Javascript Scroll Help
- Started
- Last post
- 12 Responses
- fifty50
A client of mine really likes how the ads on the right side of this page automatically jump up a space every 10 seconds and would like this incorporated on her site.
I've tried taking the javascript on that site and creating a test page, but it just isn't working. Help, please?
Test page:
http://nexteradesign.com/temp/te…
- airey0
easy as.
- fifty500
@_@
Been staring at this code for hours now, it's driving me bonkers. My skills in Javascript are minimal.
- gavin3100
if you're being paid for this and you don't know javascript, put your source code on rentacoder along with an example of what you want. it'll cost like 10 bucks
- fifty500
I understand that the javascript is trying to give each anchor tag style attributes with absolute positioning and then change that attribute every 10 seconds, but I can't figure out what's going wrong.
I would rather not pay someone 10 bucks to fix this for me, which is why I thought my old pals at QBN might help.
- heavyt0
actually, your code is fine. from what i can tell, you are never initializing the functions.
you have initAd(), which does this, but you never run it. just call that function once in your code, and it works fine.
- heavyt0
you can test this out in most browsers by typing that fcn call in the location bar. javascript:initAd();
- fifty500
Oh my god.
I'm an idiot.Thanks guys, I would have been sitting here all night staring at this trying to figure out why it wasn't working. God damn initialization string. I'm just going to blame the bourbon.
- gavin3100
i usually don't even bother when people have copy and pasted other people's code. i'm very surprised it works that easily.
- fifty500
I don't blame you. If I were pro at Javascript I probably wouldn't bother either.
- heavyt0
@gavin - i can see your point, it isnt good to encourage that kind of behaviour. In this case, it was so close to working it was inevitable. If i thought he had no clue as to what the code was doing or how to modify it, i may not have helped.
also, i have had his portfolio bookmarked for a while now, since i thought it could be inspirational, so i figured i may owe him one.- you're very helpful to people on here.
*tips hatJnr_Madison
- you're very helpful to people on here.
- fifty500
Thanks a bunch, heavyt. If you're ever in Toronto I'll buy you a beer or two ;)