I'm trying to set a custom attribute to the target element's CSS property (font-size). How do I access the css from within a selector like:
$('.font-900').attr('data-resfont', <font-size here>);
I tried:
$('.font-900').attr('data-resfont', this.css('font-size'));
I'm guessing this will not work as 'this' refers to the attr function. My next step was:
$('.font-900').attr('data-resfont', this.target.css('font-size'));
This doesn't seem to work either. I think I'm missing something simple.