$(document).ready(function() {
var originalFontSize = 30;
var sectionH = $('.notis article h2').height();
$('h2 span').each(function(){
var spanH = $(this).height();
console.log(spanH);
if(spanH > sectionH){
console.log('paso')
var newFontSize = (sectionH/spanH) * originalFontSize;
$(this).css({"font-size" : newFontSize, "line-height" : newFontSize/1.5 + "px"});
}
});
});
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.