-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.min.js
1 lines (1 loc) · 1.94 KB
/
demo.min.js
1
!function(){var e=[document.querySelector("#objectFitWrapper"),document.querySelector("#objectPosXWrapper"),document.querySelector("#objectPosYWrapper")],t="cover",r="left",o="center";if(-1!==window.navigator.appVersion.search("Trident")){for(var n=0;n<document.querySelectorAll(".txt.top").length;n++)document.querySelectorAll(".txt.top")[n].querySelector(".fit").innerHTML=t,document.querySelectorAll(".txt.top")[n].querySelector(".x").innerHTML=r,document.querySelectorAll(".txt.top")[n].querySelector(".y").innerHTML=o;document.querySelector(".para").innerHTML="<span>You're in Internet Explorer Browser.<span>",document.querySelector(".para").classList.add("success")}else{for(n=0;n<document.querySelectorAll(".txt.top").length;n++)document.querySelectorAll(".txt.top")[n].style.display="none";document.querySelector(".para").innerHTML="<span>This is not IE Browser. Please View this page in IE for the difference of using and without using JS.</span>",document.querySelector(".para").classList.add("error"),document.querySelector(".values").style.display="none"}for(n=0;n<e.length;n++)e[n].onchange=function(){if(-1!==this.getAttribute("id").search("Fit")){t=this.value,document.querySelector(".txt.top .fit").innerHTML=this.value;for(var e=0;e<document.querySelectorAll(".txt.top").length;e++)document.querySelectorAll(".txt.top")[e].querySelector(".fit").innerHTML=t;objectFitIE.ieImg(".img",r,o,t)}else if(-1!==this.getAttribute("id").search("PosX"))r=this.value,document.querySelector(".txt.top .x").innerHTML=this.value,function(){for(var e=0;e<document.querySelectorAll(".txt.top").length;e++)document.querySelectorAll(".txt.top")[e].querySelector(".x").innerHTML=r}(),objectFitIE.ieImg(".img",r,o,t);else{o=this.value,document.querySelector(".txt.top .y").innerHTML=this.value;for(e=0;e<document.querySelectorAll(".txt.top").length;e++)document.querySelectorAll(".txt.top")[e].querySelector(".y").innerHTML=o;objectFitIE.ieImg(".img",r,o,t)}},objectFitIE.ieImg(".img",r,o,t)}();