SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Zealot matches's Avatar
    Join Date
    Aug 2006
    0 Post(s)
    0 Thread(s)

    onmouseover change background image of element


    I am trying to change the background image of an element onmouseover. Just can't seem to get it going. Below is a link to the example that does nothing and the code.

    Thanks for your help

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "">
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    		<title>Untitled Document</title>
    			#wrapper {
    				width: 150px;
    			  height: 331px;
    			  float: left;
    				background: url('grid_box.gif') left top no-repeat;
    		<script type="text/javascript">
    			 function changeBG(x){
    	        var NewBG = document.getElementById(x);
    					var highLightBG = "grid_box_highlight.gif" 
    				  = highLightBG;
    		<div id="wrapper" onmouseover="changeBG('wrapper')">
    		<div id="wrapper" onmouseover="changeBG('wrapper')">
    		<div id="wrapper" onmouseover="changeBG('wrapper')">
    Last edited by matches; Aug 28, 2007 at 09:33. Reason: made summery more relevant


Posting Permissions

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