diff --git a/src/js/app.js b/src/js/app.js index c733669..215b360 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -8,6 +8,6 @@ import dotsEffect from './modules/dots'; (($) => { // When DOM is ready $(() => { - dotsEffect.init(); + dotsEffect(); }); })(jQuery); diff --git a/src/js/modules/dots.js b/src/js/modules/dots.js index 6e384de..fff65ac 100644 --- a/src/js/modules/dots.js +++ b/src/js/modules/dots.js @@ -2,31 +2,25 @@ // // You can remove or add your own function in this file. -const dotsEffect = (() => { - const createCells = () => { - const width = 10; - const height = 10; - const size = width * height; - let html = '
'; +const createCells = () => { + const width = 10; + const height = 10; + const size = width * height; + let html = '
'; - for (let i = 0; i < size; i += 1) { - html += `
`; - } + for (let i = 0; i < size; i += 1) { + html += `
`; + } - html += '
'; + html += '
'; - return html; - }; + return html; +}; - const init = () => { - const $cnt = $('.entry-section'); - const cells = createCells(); - $cnt.html(cells); - }; +const init = () => { + const $cnt = $('.entry-section'); + const cells = createCells(); + $cnt.html(cells); +}; - return { - init, - }; -})(); - -export default dotsEffect; +export default init;