Image roll over code?

by 6 replies
7
On my current website - I was hoping to just copy the code I have in the html into a post on wordpress - I did, and it half way works.

The thumbnails all show up (5 in a row), and all link to the larger image, but before when you rolled over the image - the larger photo showed.

Maybe it's because the script tag is in the body of the post?

<script src="http://www.reikigirlsite/_profiles/tooltip.js" type="text/javascript"></script>

Should that be in the actual head of the page? And if so, how do I get it there?

If there is a better way to do it, let me know that too. I do like it this way though.
#programming #code #image #roll
  • There is a handy plugin called HiFi (Head Infection, Foot Injection) that will let you add code to the <HEAD> section of any individual post or page when you need to do things like this.

    It just adds a text box to your page editing control where you can drop in the needed code.

    -Ryan
    • [1] reply
    • I love this plugin - it however still wont work even with the code in the head - so I need another solution!

      I appreciate the suggestion, and I'm sure I'll use it at some point Thank you.
  • I wonder if your tooltip.js script requires that either the jQuery or Prototype javascript libraries to be included on the page?

    -Ryan
    • [1] reply
    • [DELETED]

    • Ryan I wish I knew what you were talking about. I still haven't found a solution. I copied the exact code from the site that's currently working, I put the tooltip stuff where it needed to be and pointed to it and nada.
  • Why don't use css sprite,

    HTML Code:
    <style type="text/css">
    a.myclass { background: url(image.png) no-repeat 0% 0%; display: block; width: 200px; height:20px; }
    a.myclass:hover { background-position: 0% 100%; }
    </style>
    like that
    • [1] reply

    • Oknoorap - can I use that in a page - like in the posting section? Or does it have to be in the code and not in the post part?

Next Topics on Trending Feed

  • 7

    On my current website - I was hoping to just copy the code I have in the html into a post on wordpress - I did, and it half way works. The thumbnails all show up (5 in a row), and all link to the larger image, but before when you rolled over the image - the larger photo showed.