Results 1 to 5 of 5

Thread: Mouse-over image script

  1. #1
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Mouse-over image script

    Does anyone know where I might find a script to give you a preview of a thumbnail image when the cursor is held above it? I've found the ones that you have to click the image but I can't use that.

    There is an example on templatemonster.com but I can't find the script for it.

    Thanks in advance for any help.

    Razor

  2. #2
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

  3. #3
    Join Date
    Apr 2008
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post

    Default

    Make the onmouseover "preview(image1)" and id "image1". Then add this code:
    <script type="text/javascript">
    function preview(id) {
    //Set the height of the preview
    var height = 100;
    document.getElementById(id).style.height= height;
    }
    </script>You can reuse this code on different images as long as you change the preview() function's id argument to the id of the image affected.

  4. #4
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by matthewbluewars View Post
    Make the onmouseover "preview(image1)" and id "image1". Then add this code:
    <script type="text/javascript">
    function preview(id) {
    //Set the height of the preview
    var height = 100;
    document.getElementById(id).style.height= height;
    }
    </script>You can reuse this code on different images as long as you change the preview() function's id argument to the id of the image affected.
    Cool, thanks for the help guys, works great!

  5. #5
    Join Date
    Jan 2020
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I was looking for the same thing for my website.
    Last edited by james438; 01-26-2020 at 01:08 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •