you need to verify the directory location of the file jquery.fullpage.js
the error 404 indicates that this file is not found...
Question
I have a question about the Modernizr.load routine that I can't get to work. This is my code:
Modernizr.load([
{
//CDN reference provided by http://www.hongkiat.com/blog/css-javascript-fallback-methods/ | Jake Rocheleau
load: 'https://code.jquery.com/jquery-1.11.1.min.js',
complete: function () {
if (!window.jQuery) {
Modernizr.load('JavaScript/jquery-1.11.1.min.js');
}
}
},
{
load: [
'JavaScript/jquery.queryloader2.js',
'JavaScript/jquery.easings.min.js',
'JavaScript/jquery.slimscroll.min.js',
'JavaScript/jquery.fullpage.js'
],
complete: function () {
jQuery.noConflict(); // Block any conflicting jQuery markup from killing the workbench
jQuery(document).ready(function ($) {
/*
DOM Event attachment fix (adjustment made to attachEvent by removing the 'on'-prefix to eventName)
There must be a better way to bind events with prefixes?
Credit: http://stackoverflow.com/a/1695383/3305017
*/
function bindDOMEvent(el, eventName, eventHandler) {
if (el.addEventListener) {
el.addEventListener(eventName, eventHandler, false);
} else if (el.attachEvent) {
el.attachEvent(eventName, eventHandler);
}
}
bindDOMEvent(window, 'DOMContentLoaded', function () {
$('body').queryLoader2({
percentage: true
});
});
$('#fullpage').fullpage({
verticalCentered: true,
resize: false,
slidesColor: [''],
anchors: ['firstSlide', 'secondSlide', 'thirdSlide', 'fourthSlide'],
scrollingSpeed: 700,
easing: 'easeInQuart',
menu: false,
navigation: true,
navigationPosition: 'right',
navigationTooltips: ['', '', '', ''],
slidesNavigation: true,
slidesNavPosition: 'bottom',
loopBottom: false,
loopTop: false,
loopHorizontal: false,
autoScrolling: true,
scrollOverflow: true,
css3: true,
paddingTop: '0',
paddingBottom: '0',
fixedElements: '#element1, .element2',
normalScrollElements: '#element1, .element2',
keyboardScrolling: true,
touchSensitivity: 15,
continuousVertical: false,
animateAnchor: true,
//events
onLeave: function (index, direction) {
if (index == 3) {
$('.progressBarList').each(function () {
progressBar(100, $(this).find('.progressBar'));
});
}
},
afterLoad: function (anchorLink, index) {
if (index == 3) {
$('.progressBarList').each(function () {
progressBar($(this).find('.perc').html().replace('%', ''), $(this).find('.progressBar'));
});
}
},
afterRender: function () {
$('#scroll-navigation').delay(4000).fadeOut('slow');
},
afterSlideLoad: function (anchorLink, index, slideAnchor, slideIndex) { },
onSlideLeave: function (anchorLink, index, slideIndex, direction) { }
});
$.unbindall = function () {
jQuery('*').unbind();
};
// Kill memory leaks
$(document).unload(function () {
jQuery.unbindall();
});
});
}
}
]);
When I view the console in Firebug I get this error:
TypeError: $(...).fullpage is not a function. [url]/jquery.fullpage.js [HTTP/1.1 404 Not Found 20ms]
What am I missing? Why are the resources not loading at all?
La solution
you need to verify the directory location of the file jquery.fullpage.js
the error 404 indicates that this file is not found...