This repository has been archived by the owner on Jun 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from frontend/feature/fix-jquery
Feature/fix jquery
- Loading branch information
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
/* globals jQuery, document */ | ||
|
||
// You will use that file to import all your scripts | ||
// Ex: import gallery from './gallery'<% if (svgIcons) { %> | ||
import svgIcons from '../icons/svg-icons'; | ||
|
||
svgIcons(); // Must run as soon as possible<% } %> | ||
|
||
const init = () => { | ||
// Run your imported scripts | ||
// Ex: gallery(); | ||
}; | ||
|
||
(function ($) { | ||
$(document).ready(function () { | ||
// Run your imported scripts | ||
// Ex: gallery(); | ||
}); | ||
$(document).ready(() => init()); | ||
})(jQuery); | ||
document.addEventListener('ToolboxReady', () => init()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters