I have a problem with set fontStyle attribute to single element(by id) in popover. I get onClick event, put style (bold font style) to all class elements and then try to put another style(normal) to one(clicked) element. My code is:
$(document).on('click', '.listElement', function () {
$('.listElement').css('font-weight', 'bold');
alert(this.id);
$(this).css('font-weight', 'normal');
});
There is a demo
Setting bold style for all class elements works and dialog shows correctly id so this is right element(in this) but .css() method doesn't work. I tried to put style by using id like:
$('#A').css('font-weight', 'normal');
and there is no error in console but it doesn't work as well. Is there any other way to set fontStyle to single unique element?
normalfont style for all elements and after first click(on any element) there isboldstyle for all.