You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
530 B

5 years ago
import 'slick-slider/slick/slick.min'
5 years ago
window.readyResize = (callback, orientation = false) => {
if ($.isFunction(callback)) {
$(document).ready(()=>{
callback()
})
$(window).resize(()=>{
console.log('Window resize ')
callback()
})
if(orientation) {
window.addEventListener("orientationchange", () => {
const WCO = ($(window).width() > $(window).height()) ? "landscape" : "portrait"
console.log('Change orientation: ' + WCO)
callback()
})
}
}
}