change attr value if value =
I want to change all fill values into svg when clicking a button, but only if a color == #18B0FE , if color != #18B0FE I do nothing
I am trying
- $(".map-close").click(function() {
- $('path').attr('fill').each(function() {
- if($(this).is('#18B0FE')){
- $('path').attr('fill', '#01283F');
- }
- });
- });
but it doesn't work
thanks for your help