SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to change the cursor type on hot object.

    I have a image gallery that gives very nice popup windows when you click the thumbnail for the larger picture.
    The problem is that when you hover over the thumbnail(link) it doesn't change the cursor type to a hand which makes it hard to know that it's a link.
    I've searched both www.tizag.com and www.w3schools.com for references/examples on this but can't find any.

    Here is the html and javascript code.
    HTML Code:
    <img src="galleri/pic1.jpg" id="pic1" onClick="galleriOpenLargePic1()"></img>
    All the pics in the gallery follows the same format but with a different number as in "pic2" isntead of "pic1".

    and the javascript:
    Code:
    function galleriOpenLargePic1() {
      window.open("galleri/pic1_large.html","pic_1","status=0, rezizable=0, width=800,height=560);
    }

  2. #2
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could make images with an onclick attribute share a class, and set the css of that class in a style sheet:

    Code:
    .hotimage{cursor:pointer}
    pointer is the css name for the hand -


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
  •