Fix lint of creative JS
This commit is contained in:
parent
7b50e8b606
commit
cc240e2d4f
2 changed files with 61 additions and 60 deletions
|
@ -4,41 +4,41 @@
|
||||||
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
|
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
// jQuery for page scrolling feature - requires jQuery Easing plugin
|
||||||
"use strict"; // Start of use strict
|
$('a.page-scroll').bind('click', function(event) {
|
||||||
|
const anchor = $(this);
|
||||||
// jQuery for page scrolling feature - requires jQuery Easing plugin
|
$('html, body').stop().animate(
|
||||||
$('a.page-scroll').bind('click', function(event) {
|
{
|
||||||
var $anchor = $(this);
|
scrollTop: ($(anchor.attr('href')).offset().top - 50)
|
||||||
$('html, body').stop().animate({
|
},
|
||||||
scrollTop: ($($anchor.attr('href')).offset().top - 50)
|
1250,
|
||||||
}, 1250, 'easeInOutExpo');
|
'easeInOutExpo'
|
||||||
|
);
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Highlight the top nav as scrolling occurs
|
// Highlight the top nav as scrolling occurs
|
||||||
$('body').scrollspy({
|
$('body').scrollspy({
|
||||||
target: '.navbar-fixed-top',
|
target: '.navbar-fixed-top',
|
||||||
offset: 51
|
offset: 51
|
||||||
})
|
});
|
||||||
|
|
||||||
// Closes the Responsive Menu on Menu Item Click
|
// Closes the Responsive Menu on Menu Item Click
|
||||||
$('.navbar-collapse ul li a').click(function() {
|
$('.navbar-collapse ul li a').click(function() {
|
||||||
$('.navbar-toggle:visible').click();
|
$('.navbar-toggle:visible').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fit Text Plugin for Main Header
|
// Fit Text Plugin for Main Header
|
||||||
$("h1").fitText(
|
$('h1').fitText(
|
||||||
1.2, {
|
1.2, {
|
||||||
minFontSize: '35px',
|
minFontSize: '35px',
|
||||||
maxFontSize: '65px'
|
maxFontSize: '65px'
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Offset for Main Navigation
|
// Offset for Main Navigation
|
||||||
$('#main-nav').affix({
|
$('#main-nav').affix({
|
||||||
offset: {
|
offset: {
|
||||||
top: 100
|
top: 100
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(jQuery); // End of use strict
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/*global jQuery */
|
|
||||||
/*!
|
/*!
|
||||||
* FitText.js 1.2
|
* FitText.js 1.2
|
||||||
*
|
*
|
||||||
|
@ -9,25 +8,29 @@
|
||||||
* Date: Thu May 05 14:23:00 2011 -0600
|
* Date: Thu May 05 14:23:00 2011 -0600
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function( $ ){
|
$.fn.fitText = function( kompressor, options ) {
|
||||||
|
|
||||||
$.fn.fitText = function( kompressor, options ) {
|
|
||||||
|
|
||||||
// Setup options
|
// Setup options
|
||||||
var compressor = kompressor || 1,
|
const compressor = kompressor || 1,
|
||||||
settings = $.extend({
|
settings = $.extend({
|
||||||
'minFontSize' : Number.NEGATIVE_INFINITY,
|
'minFontSize' : Number.NEGATIVE_INFINITY,
|
||||||
'maxFontSize' : Number.POSITIVE_INFINITY
|
'maxFontSize' : Number.POSITIVE_INFINITY
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
return this.each(function(){
|
return this.each(function() {
|
||||||
|
|
||||||
// Store the object
|
// Store the object
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
// Resizer() resizes items based on the object width divided by the compressor * 10
|
// Resizer() resizes items based on the object width divided by the compressor * 10
|
||||||
var resizer = function () {
|
var resizer = function () {
|
||||||
$this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize)));
|
$this.css('font-size',
|
||||||
|
Math.max(
|
||||||
|
Math.min(
|
||||||
|
$this.width() / (compressor * 10),
|
||||||
|
parseFloat(settings.maxFontSize)
|
||||||
|
),
|
||||||
|
parseFloat(settings.minFontSize))
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Call once to set.
|
// Call once to set.
|
||||||
|
@ -38,6 +41,4 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
})( jQuery );
|
|
||||||
|
|
Reference in a new issue