1
Fork 0

remove jquery fittext

This commit is contained in:
Jake Howard 2016-08-25 21:52:19 +01:00
parent 8603e19617
commit 8d7e008861
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 0 additions and 52 deletions

View file

@ -28,13 +28,6 @@ $('.navbar-collapse ul li a').click(function() {
$('.navbar-toggle:visible').click();
});
// Fit Text Plugin for Main Header
$('h1').fitText(
1.2, {
minFontSize: '35px',
maxFontSize: '65px'
}
);
// Offset for Main Navigation
$('#main-nav').affix({

View file

@ -1,5 +1,4 @@
import 'jquery.easing';
import './jquery.fittext';
import './creative';
import WOW from 'wow.js';

View file

@ -1,44 +0,0 @@
/*!
* FitText.js 1.2
*
* Copyright 2011, Dave Rupert http://daverupert.com
* Released under the WTFPL license
* http://sam.zoy.org/wtfpl/
*
* Date: Thu May 05 14:23:00 2011 -0600
*/
$.fn.fitText = function( kompressor, options ) {
// Setup options
const compressor = kompressor || 1,
settings = $.extend({
'minFontSize' : Number.NEGATIVE_INFINITY,
'maxFontSize' : Number.POSITIVE_INFINITY
}, options);
return this.each(function() {
// Store the object
var $this = $(this);
// Resizer() resizes items based on the object width divided by the compressor * 10
var resizer = function () {
$this.css('font-size',
Math.max(
Math.min(
$this.width() / (compressor * 10),
parseFloat(settings.maxFontSize)
),
parseFloat(settings.minFontSize))
);
};
// Call once to set.
resizer();
// Call on resize. Opera debounces their resize by default.
$(window).on('resize.fittext orientationchange.fittext', resizer);
});
};