seminar2/app/assets/stylesheets/seminar/background_style/9/js/layout.js

26 lines
704 B
JavaScript
Raw Normal View History

;(function($, win, undefined) {
// ECMAScript 5 嚴格模式
'use strict';
$(document).ready(function() {
var timeout_id;
$(window).resize(function() {
window.clearTimeout(timeout_id)
if (window.innerWidth < 768) {
} else {
if($("div.aside").length == 0){
timeout_id = setTimeout(function(){
if($('.mobile-menu .modules-menu').length > 0){
$("header .container").append($('.mobile-menu .modules-menu'))
}
}, 500);
}else{
timeout_id = setTimeout(function(){
if($('.modules-menu').length > 0){
$("div.aside").eq(0).append($('.modules-menu'))
}
}, 500);
}
}
})
})
}(jQuery, window));