Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 359009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:21:12+00:00 2026-05-12T12:21:12+00:00

Basically I need this: http://plugins.jquery.com/project/maphilight …but instead of just having the <AREA> tags recieve

  • 0

Basically I need this:

http://plugins.jquery.com/project/maphilight

…but instead of just having the <AREA> tags recieve a border or fill color on rollover, have them recieve a background image. The image needs to be clipped by the shape of the <AREA>s.

Any ideas?

Basically the setup I have is as follows:

<img usemap="#map" />
<map name="map">
  <area coords="foo,bar">
  <area coords="foo,bar">
  <area coords="foo,bar">
</map>

And I want the background image of each AREA tag to change on rollover.

A faux version of what I want is here:

tankedup-imaging. com/css_dev/rollover.html

…except that here, notice this is not a “true” image map, the rollover areas are not really bound by AREA tags.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:21:12+00:00Added an answer on May 12, 2026 at 12:21 pm

    OK, my solution.

    Start with an image map like so:

    <img src="nav.jpg" id="main-nav" usemap="#imagemap" />              
    
    <map id="imagemap" name="imagemap">
        <area id="item1" href="item1.shtml" shape="poly" coords="153,52,484,6,492,43,158,74" />
        <area id="item2" href="item2.shtml" shape="poly" coords="95,96,287,84,289,112,95,118,97,118" />
    </map>
    

    Then, I use jQuery to swap the SRC attribute of the IMG when the user hovers over each specific AREA, then return the IMG to the off state on mouseout.

    $(document).ready(function() {
    
    //set off state 
    var nav_off = "/images/nav-off.jpg";
    
    // functions for over and off
    function over(image) {
        $("#main-nav").attr("src", image);
    }
    function off() {
        $("#main-nav").attr("src", nav_off);
    }
    
    $("#imagemap area").hover(
        function () {
            var button = $(this).attr("id");
            over("/images/nav-" + button + ".jpg");
        },
        function () {
            off();
        });
    
    });
    

    This could probably be combined with CSS Sprites somehow, swapping the background-position of some image during rollover.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a hell of a time using http://plugins.jquery.com/project/bgImageTransition to create a slideshow of crossfaded
This is probably easier than I am making it, but basically what I need
So basically I need to add to this form - http://jsfiddle.net/tSsvb/ automatically price calculation.
Basically I need one like this: http://yogafasting.org/ First, it displays a partial image and
Basically I want to use the Twitter Users Lookup (REST API) method, this: http://apiwiki.twitter.com/w/page/24142947/Twitter-REST-API-Method:-users-lookup
I am trying to use the Address plugin from http://www.asual.com/jquery/address/ and I really need
I've tried a few different jQuery centering plugins but can't seem to figure this
I basically need to check if there is an easier way to do this
Basically what I need is to do something like this App.CommentView = Backbone.View.extend({ className:
Basically I have this string for example $str = 'По, своей 12' I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.