remove jquery fittext
This commit is contained in:
parent
8603e19617
commit
8d7e008861
3 changed files with 0 additions and 52 deletions
|
@ -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({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'jquery.easing';
|
||||
import './jquery.fittext';
|
||||
import './creative';
|
||||
|
||||
import WOW from 'wow.js';
|
||||
|
|
|
@ -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);
|
||||
|
||||
});
|
||||
|
||||
};
|
Reference in a new issue