• Edit
  • Delete

html: adjust fontsize according to text length (textfill)

https://github.com/jquery-textfill/jquery-textfill

Fixed a bug: https://github.com/jquery-textfill/jquery-textfill/pull/62

<div style="width: 700px">
  <h1><style>Some crazy good headline</style><h1>
</div>

<script type="text/javascript">
    jQuery('h1').textfill({
        widthOnly: true 
        minFontPixels: 12,
        maxFontPixels: 24       
        //debug: true 
    });
</script>