There is html markup. For clarity, colored blocks to correctly explain your question.
Here is the jquery code:
$(document).ready(function(){ if($('div').is('[class*=icon-my]')){ $('div.icon_block').removeClass('icon_block').addClass('icon_block_my_big').css("background-color","yellow"); } });
But with this code, the condition for all blocks (green, orange) works. Question: how can I alter my code so that the condition only works on green blocks?