I want to add round borders to selected image areas on a map, how do I do it?
Asked
Active
Viewed 805 times
4 Answers
2
You may use jQuery:
$('body').on('click', 'img', function() {
$(this).addClass('with-round-corners');
});

hasrthur
- 1,410
- 15
- 31
-
I want to apply the border, which should be round, only on selected image areas tags, how do I do it? – Joy May 16 '12 at 07:13
-
use webkit-border-radius:50% with this answer – Ranganadh Paramkusam May 16 '12 at 07:36
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
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