[Solved] change name of class based on the content of another div [closed]

[ad_1]

Check this Demo Fiddle

$('.price').each(function(){

    $(this).parents('.price-class').removeClass('price-class').addClass($(this).html()+'-price');
});

You need to use .removeClass() and .addClass().

[ad_2]

solved change name of class based on the content of another div [closed]