I have this code
$(textObject).children().each(function() {
$(this).removeAttr('style');
console.log('removing style from first level element: '+this);
});
But I want it to affect all nested elements as well, this one only affects first level children. I have also tried
$(this).children().removeAttr('style');
Which doesn't work.
I have also tried
$(this).children().css('font-size','');
which doesn't work either.
It's probably clear what I want to accomplish.
try
$(this).find('*').removeAttr('style');
Demo Here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With