0

I want to add round borders to selected image areas on a map, how do I do it?

Joy
  • 92
  • 1
  • 9

4 Answers4

2

You may use jQuery:

$('body').on('click', 'img', function() {
    $(this).addClass('with-round-corners');
});
hasrthur
  • 1,410
  • 15
  • 31
0

You can use CSS

img{
    border:none;
}
img:hover{
    border:1px solid;
}
Ranganadh Paramkusam
  • 4,258
  • 2
  • 22
  • 33
  • I want to apply the border, which should be round, only on selected image areas tags, I do not think this would help. – Joy May 16 '12 at 07:13
0
img
{
border:0px;
}
img:hover
{
border:1px solid black;
border-radius:5px;
}
cgvector
  • 931
  • 1
  • 10
  • 13
0

Use the below JQuery code on click :

$(imageAreasSelector).css({ 'border': '1px solid Red' });
$(imageAreasSelector).css({ 'border-radius': '5px' });
HGK
  • 386
  • 1
  • 4
  • 13
  • Would have done that, unfortunately the image selectors does not have any id. It is populated dynamically from server side(ASP.NET) which does not let you add any id attribute. – Joy May 17 '12 at 08:47