There is an image. It identified the site (image map).

Is it possible to make it so that when you hover over this area, it becomes red, for example?

    2 answers 2

    Use jquery mouseover

    • Here is my code. For which tag to use jquery mouseover? <map id = "imgmap201282416459" name = "25"> <area shape = "rect" alt = "" title = "" coords = "123,358,350,438" href = " ya.ru " target = "" /> </ map> <img src = "25.jpg" usemap = "# 25" /> - vinnie
    document.getElementById('imgmap201282416459').addEventListener("mouseover", function () { document.getElementById('imgmap201282416459').style.backgroundColor = 'Цвет_при_наведении'; }, false); document.getElementById('imgmap201282416459').addEventListener("mouseout", function () { document.getElementById('imgmap201282416459').style.backgroundColor = 'Цвет_при_отводе_мыши_от_элемента'; }, false); 

    And no jQuery needed :)

    • Does not work (( - vinnie
    • Where did you put the code? What errors gives out in the console? - LightShock
    • do you work? You can throw me a code that works, if it's not difficult - vinnie