• Post Reply Bookmark Topic Watch Topic
  • New Topic

micron.js  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm getting an error 'Object doesn't support property or method 'addEventListener''
Trying to use the micron.js.
Here is the html:

error is from micron.min.js
var watchEvents=function(){window.addEventListener("click",function(t){var e=t.target,n="mjs-",i=e.dataset.micron,a=e.dataset.micronDuration,o=e.dataset.micronTiming,r=e.dataset.micronBind,s=e.dataset.micronId;if(void 0===i)return!1;if("true"===r){if(void 0===s)return!1;if(void 0===(u=document.getElementById(s))||null===u)return!1;var d=u.cloneNode(!0);u.parentNode.replaceChild(d,u),d.classList.add(n+i)}else{var u;d=(u=e).cloneNode(!0);u.parentNode.replaceChild(d,u),d.classList.add(n+i)}void 0!==a?isNaN(a)?d.style.animationDuration=".45s":d.style.animationDuration=a+"s":d.style.animationDuration=".45s",void 0!==o&&("linear"===o||"ease-in"===o||"ease-out"===o||"ease-in-out"===o)?d.classList.add(n+o):d.classList.add(n+"ease-in-out")})};"loading"!=document.readyState?watchEvents():document.addEventListener("DOMContentLoaded",function(){watchEvents()});var Micron=function(){var t,e;return{getEle:function(n){return void 0!=(t=document.querySelector(n))&&null!=t?(e=t.cloneNode(!0),t.parentNode.replaceChild(e,t),this):this},interaction:function(t){if(void 0!==e&&null!==e){if(void 0!=t&&null!=t&&-1==t.indexOf(" ")){var n="mjs-"+t;return e.classList.add(n)

Any help would be much appreciated.
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!