1
Fork 0

Fix lint on main js files

This commit is contained in:
Jake Howard 2017-05-06 14:58:44 +01:00
parent a0fe313f61
commit b72f70384b
4 changed files with 54 additions and 63 deletions

View file

@ -2,5 +2,8 @@
"extends": [
"dabapps/commonjs",
"dabapps/browser",
]
],
"globals": {
"$": true
}
}

View file

@ -1,61 +1,45 @@
/*
Alpha by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
$(function() {
var $window = $(window),
$body = $('body'),
$header = $('#header'),
$banner = $('#banner');
// Fix: Placeholder polyfill.
$('form').placeholder();
// Dropdowns.
$('#nav > ul').dropotron({
alignment: 'right'
});
// Off-Canvas Navigation.
// Navigation Button.
$(
'<div id="navButton">' +
'<a href="#navPanel" class="toggle"></a>' +
'</div>'
)
.appendTo($body);
// Navigation Panel.
$(
'<div id="navPanel">' +
'<nav>' +
$('#nav').navList() +
'</nav>' +
'</div>'
)
.appendTo($body)
.panel({
delay: 500,
hideOnClick: true,
hideOnSwipe: true,
resetScroll: true,
resetForms: true,
side: 'left',
target: $body,
visibleClass: 'navPanel-visible'
});
// Fix: Remove navPanel transitions on WP<10 (poor/buggy performance).
// Header.
// If the header is using "alt" styling and #banner is present, use scrollwatch
// to revert it back to normal styling once the user scrolls past the banner.
// Note: This is disabled on mobile devices.
});
})(jQuery);
'use strict';
/*
Alpha by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
$(function() {
var $body = $('body');
// Fix: Placeholder polyfill.
$('form').placeholder();
// Dropdowns.
$('#nav > ul').dropotron({
alignment: 'right'
});
// Navigation Button.
$(
'<div id="navButton">' +
'<a href="#navPanel" class="toggle"></a>' +
'</div>'
).appendTo($body);
// Navigation Panel.
$(
'<div id="navPanel">' +
'<nav>' +
$('#nav').navList() +
'</nav>' +
'</div>'
)
.appendTo($body)
.panel({
delay: 500,
hideOnClick: true,
hideOnSwipe: true,
resetScroll: true,
resetForms: true,
side: 'left',
target: $body,
visibleClass: 'navPanel-visible'
});
});

View file

@ -1,3 +1,5 @@
'use strict';
require('./jquery-global');
require('bootstrap');

View file

@ -1,4 +1,6 @@
const jQuery = require('jquery');
'use strict';
var jQuery = require('jquery');
window.$ = jQuery;
window.jQuery = jQuery;