Forums >
PhotoMorpher >
How to strip away all functionality and just autoload photos
Author
Message
1) AdamGroup: Guests IP: 210.17.--.--
Posted:
Hi Angus,
I'd like to remove the buttons of the script and just use the autoloader to display the images in a table. Unfortunately, my knowledge of css is very limited and I can't strip out the correct bits of code without losing the images. Can you help?
Also, and I fear this will require a whole different piece of code, but is it possible to randomly select the images rather than loading them in order?
Many thanks, Adam.
2) Angus TurnbullGroup: Moderators Posts: 4042Joined: 7 Dec 2003Location: New ZealandIP: 125.238.--.--
Posted:
The simple, cheating way is to put:
style="display: none"
on any of the HTML tags you want to hide. Voila, invisible.
As for randomness, here's a snippet you can paste into the script:
PhotoMorpher.prototype.random = function() { with (this) { var items = list.getElementsByTagName('li'); this.display(items[Math.floor(Math.random() * items.length)]); }};
Then just call photo.random() just like you would call photo.next(). I haven't tested this but it should work OK.