Previously on Philroche.net, the header images were populated from a PHP Array which generated a ul with javascript links to change the header image. Not nice as it relied on javascript. After some ajaxian fun, the list is now generated from an XML playlist and the list is fully accessible with click events attached to each link to change the header image. You can view all the source below but there’s also an example page. Please note that this is version 0.1 (read- possibly buggy) so if there’s any problems let me know and I’ll debug.
Source code
- images.xml.source.html
- index.html.source.html
- javascript.js.source.html
- imagerotation-v0.1-1130-30-03-2007.zip












5 Comments
Works cool mate, though I noticed you’ve got the awesome prototype library included but not using it??
(Looks like that live search thing uses it? which is also cool btw)
I do really like prototype and I’ve used it quite a few times in work. I wanted to write one from scratch though. I’ve also looked at jQuery which looks very powerful and simple to write.
“Body surfing” - great image!!!!
I have a question.
Does your implementation require images to be the same size?
No, the images can be any size - but for my header images they’re all the same size.
How can I incorparate a next and previous image link going through the XML list?
Example: soweso.com/blog that is the effect I want to recreate with this code.
Post a Comment