skrollr-menu icon indicating copy to clipboard operation
skrollr-menu copied to clipboard

No support for require.js

Open haggis777 opened this issue 10 years ago • 1 comments

Love your code, but I have an issue with the menu plugin. In skrollr you check for the existence of require and load it as a modal if its there or else add it to the window instance. In the menu control, you just assume that require.js does not exist and just try to pull it from the window object:

var MENU_DURATION_ATTR = 'data-menu-duration'; var MENU_IGNORE_ATTR = 'data-menu-ignore';

var skrollr = window.skrollr; <-------- is this right?
var history = window.history;
var supportsHistory = !!history.pushState;

Is this by design?

haggis777 avatar Jul 15 '15 00:07 haggis777

All this module stuff wasn't written by me and nobody updated the plugins. https://github.com/Prinzhorn/skrollr#amd

Please note that only skrollr core has AMD support so far.

Prinzhorn avatar Aug 12 '15 13:08 Prinzhorn