Saturday, May 24, 2008

Marquee that slows/pause on mouse over - Simple image filmstrip/scroller

Lets see how we can create a simple image filmstrip or scroller using HTML Marquee tags.


<marquee onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=4">
Scrolling text here. Scrolling text/images goes here
</marquee>


If you want to retrieve images dynamically using PHP here is the logic,



<marquee onMouseover="this.scrollAmount=3" onMouseout="this.scrollAmount=6">
<?php
//database connection
//retrive image names from database
//get full image path
?>
<img src="<?php echo $image_path; ?>" />
</marquee>




Subscribe To My Blog

4 comments:

  1. Cheers, works like a dream!

    ReplyDelete
  2. I was looking for a very simple line of code that would allow my vertical marquee to pause on mouseover -- found many very complicated ones that didn't work the way I wanted. This one was very simple, fast, and it works! Thanks!

    ReplyDelete