Ajax header image rotation

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

5 Comments

  1. Jarrad
    Posted April 2, 2007 at 2:07 am | Permalink

    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)

  2. Posted April 2, 2007 at 2:55 pm | Permalink

    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.

  3. Posted April 15, 2007 at 5:35 am | Permalink

    “Body surfing” - great image!!!!
    I have a question.
    Does your implementation require images to be the same size?

  4. Posted April 15, 2007 at 9:00 pm | Permalink

    No, the images can be any size - but for my header images they’re all the same size.

  5. Posted June 5, 2007 at 11:33 am | Permalink

    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

Your email is never published nor shared. Required fields are marked *
*
*