- Create Account

How to strip away all functionality and just autoload photos

Forums > PhotoMorpher > How to strip away all functionality and just autoload photos
Author
Message

1) Adam Group: Guests
IP: 210.17.--.--
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 Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 125.238.--.--
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.

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.