Advertisement
Guest User

Untitled

a guest
Aug 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import "./product.css";
  2.  
  3. document.addEventListener('DOMContentLoaded', event => {
  4.  
  5.   if (document.querySelector('.js-product__gallery')) {
  6.     let galeryImport = import('./js/product-gallery')
  7.     galeryImport.then(module => {
  8.       new module.default();
  9.     })
  10.   }
  11.  
  12.   if (document.querySelector('.js-tint__more')) {
  13.     import('./js/product-tint').then(async module => {
  14.       new module.default();
  15.       let {default: galery} = await galeryImport
  16.       new galery()
  17.     })
  18.   }
  19.  
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement