-
Notifications
You must be signed in to change notification settings - Fork 5
/
duplicity.min.js
1 lines (1 loc) · 1.07 KB
/
duplicity.min.js
1
function affectScreenSizeChange(a,b){$("body").removeClass("phone tablet desktop");$("[data-display]").css("display","none");duplicity.phone=false;duplicity.tablet=false;duplicity.desktop=false;if(b=="phone"){duplicity.phone=true;$("body").addClass("phone");$("[data-display~='phone']").css("display","")}else if(b=="tablet"){duplicity.tablet=true;$("body").addClass("tablet");$("[data-display~='tablet']").css("display","")}else{duplicity.desktop=true;$("body").addClass("desktop");$("[data-display~='desktop']").css("display","")}}function detectScreenSizeChange(a){if(a===undefined){a=false}var b;if(duplicity.phone){b="phone"}else if(duplicity.tablet){b="tablet"}else if(duplicity.desktop){b="desktop"}else{b=null}var c=$(window).width();var d;if(c<640){d="phone"}else if(c>=640&&c<=1024){d="tablet"}else{d="desktop"}if(b!=d||a){affectScreenSizeChange(b,d)}try{if(b!=null&&b!=d){screenSizeChanged(b,d)}}catch(e){}}var duplicity={phone:false,tablet:false,desktop:false};detectScreenSizeChange();$(document).ready(function(){detectScreenSizeChange(true)});$(window).resize(detectScreenSizeChange)