Hooch Posted August 6, 2009 Share Posted August 6, 2009 Hello..I'm not sure this is in the right spot so please forgive me if it is.But I found a nice image slider atLinkyI'm trying to edit it for my site but I have no idea where the following line goes. window.addEvent('domready', function(){ new BarackSlideshow('menu', 'pictures', 'loading', {transition: 'slide-left', auto: true});}); If you browse to that link above you see the only instruction for that code is...BarackSlideshow is initialized as follows:Any idea where it would go???I tried putting it in the header, but no go.Thanks for your time Link to comment Share on other sites More sharing options...
justsomeguy Posted August 6, 2009 Share Posted August 6, 2009 It can really go anywhere, you can put it in the head in a script block or in the body in a script block. I don't think that all browsers implement window.addEvent though, some use window.attachEvent. Link to comment Share on other sites More sharing options...
Ingolme Posted August 6, 2009 Share Posted August 6, 2009 I wasn't aware that there was an "addEvent" function implemented in browsers. I have a custom function with that name for my events. Link to comment Share on other sites More sharing options...
justsomeguy Posted August 6, 2009 Share Posted August 6, 2009 That's right, it's either addEventListener or attachEvent. The code might have added an addEvent method to the window object though. That looks like it uses Mootools. Link to comment Share on other sites More sharing options...
Hooch Posted August 7, 2009 Author Share Posted August 7, 2009 It's using mootools.So where would this go then?? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2009 Share Posted August 7, 2009 It can go anywhere as long as the window.addEvent method is defined when that code runs. The site you linked to has files for download, I assume you downloaded the code for the slideshow right? That might have installation instructions or more information in it. You should also be using something like Firebug or something where you can check for Javascript errors. Link to comment Share on other sites More sharing options...
Hooch Posted August 7, 2009 Author Share Posted August 7, 2009 Zero instructions.Just the one I pasted in post one.Thanks guys. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.