www.webdeveloper.com
Results 1 to 1 of 1

Thread: solution for div bg swap

  1. #1
    Join Date
    Nov 2006
    Posts
    198

    solution for div bg swap

    Hi folks

    I need to solve the problem that can be seen in the attachments. When a nav item is hovered, the area below needs to have a dark transparent bg image. Because I need IE support for the pngs I set it up as follows...there is an empty div below the nav set to the appropriate dimensions. Not semantic I know but that's the only way I can get the bg pngs to swap in and out. So anyway, I need to figure a way where when any nav item is hovered over, the bg will switch on the empty div. I am using this jquery statement which isn't working:

    Code:
    $function() {
    $("nav a").hover(over,out);
    	function over (event) {
         $(.spacer-bg-off).css("background", "url(images/spacer-content-bg.png)");
       }
       function out (event) {
         $(.spacer-bg-off).css("background", "none");
       });
    Can someone take a look at these images and see if you have any ideas? I am stuck on this one...thank you...
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles