Skip to content
Snippets Groups Projects
Commit 9bb36e68 authored by khawkins98's avatar khawkins98
Browse files

Add initial detection of invoking on empty pages #115

parent fb4033b4
No related branches found
No related tags found
No related merge requests found
......@@ -428,6 +428,11 @@ function invokeResponsiveMenuEBI() {
});
$.fn.foundationExtendEBI = function() {
// Warn if inoking this on a near-empty html page
if (document.querySelectorAll('body *').length < 5) {
console.warn('It looks like you\'ve called foundationExtendEBI() before your body element has been populated with content. Most likely this is as you are using a JS framework, so you might want to read the guidance at https://wwwdev.ebi.ac.uk/style-lab/websites/meta-patterns/js-frameworks.html');
}
// Activate EMBL dropdown menu
activateEMBLdropdown();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment