JQuery maphighlight for changing area highlight color based on condition

后端 未结 2 1115
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-04 01:38

I have created Image Map using map co-ordinates and have to highlighted co-ordinates, which is working fine but what i need is, To change the highlight color depends upon th

2条回答
  •  借酒劲吻你
    2020-12-04 01:57

    working code is below,check this

         $(document).ready(function() //on page load
    {
         $('area').each(function()//get all areas
                  {
                      var co=$(this).attr('coords');//get coords by attr from area
                      alert(co); //alert coords in alertbox
                  });
     });
    

提交回复
热议问题