Marela widgets II

  • Written by: Marko Samastur
  • Published on:
  • Category: Company, Javascript, Web

Heat is gone, work isn’t, but I still found time to have fun while shamelessly copying other people ideas.

The result:

It’s a simple widget for displaying two randomly chosen pictures with a given tag out of up to a hundred.

The widget was successfully tested in Internet Explorer 6, Firefox 1.0 and Opera 9.0. It only sort of works in Safari, but if this is good enough for you, you can add it to your own page by inserting:


<script type="text/javascript" src="http://markos.gaivo.net/marela/doublerandom.js?username=markos&tag=moja-izbira&time=2"></script>

You should, however, replace:

  • my username (markos) with yours
  • select a tag of your chosing
  • set time lag in seconds between image replacements

I’m not quite happy with it yet. I’d like to fix Safari support and my code for avoiding two same images is still buggy. If you’d like to use the latest known working version, then use the link to my page. Otherwise you’re free to copy the contents of script’s directory.

And if you’re reading this post on the front page, you’ve might have noticed that there are no problems in using both widgets on the same page.