TOP
ADMISSION

入学者選抜情報(学部)・志願者数状況はこちら>

INTERVIEWS

アオガクで、カガヤク。

MOVIES

つながる・つなげる・青学TV

'; if (base.o.loadContainer.length > 0 && // check if we have place where load content loadContainer.length > 0 && $.inArray(url, base.o.excludeUri) < 0 && (location.origin + url) !== window.location.href) { if (base.o.beforeLoad && typeof (base.o.beforeLoad) === 'function') { base.o.beforeLoad.apply(loadContainer); } else { loadContainer.html(loading).append(clear); } // TODO: (?) save content if we will fail load next page $.ajax( { url: url, type: 'get' } ) .done(function (data) { loadContainer.html(data + clear); // set page title base.changeTitle(); // set new url base.changeUri(url); // afterLoadDone callback if (base.o.afterLoadDone && typeof (base.o.afterLoadDone) === 'function') { base.o.afterLoadDone.apply(loadContainer); } base.$waSlideMenu.trigger('afterLoadDone.' + base.o.namespace + pluginName); }) .fail(function () { // do not remove content and slide menu base.$currentMenuElement .siblings() .children('.' + base.o.classNames.menuItemBackClass) .trigger('click'); // afterLoadFail callback if (base.o.afterLoadFail && typeof (base.o.afterLoadFail) === 'function') { base.o.afterLoadFail.apply(loadContainer); } base.$waSlideMenu.trigger('afterLoadFail.' + base.o.namespace + pluginName); }) .always(function () { // afterLoadAlways callback if (base.o.afterLoadAlways && typeof (base.o.afterLoadAlways) === 'function') { base.o.afterLoadAlways.apply(loadContainer); } base.$waSlideMenu.trigger('afterLoadAlways.' + base.o.namespace + pluginName); }); } }; base.changeTitle = function () { if (base.o.setTitle) { $('title').text(base.$currentMenuElement.children('a').text()); } }; base.changeUri = function (url) { if (!!(window.history && history.pushState)) { window.history.pushState({}, '', url); } }; base._menuItemClicked = function (element, event, depth) { event.preventDefault(); event.stopPropagation(); if ($(event.target).hasClass('itemWrapper')) { if ($(event.target).parent('a').attr('href')) { window.location.href = $(event.target).parent('a').attr('href'); return false; } } // disable click while we are sliding to next menu if (base.o.nowSliding) { return false; } if ($(element).hasClass('back_link') && base.$historys.length <= 0) { return false; } base.$currentMenuElement = $(element).parent(base.o.itemSelector); var url = $(element).attr('href'), $menu_children = base.$currentMenuElement.children(base.o.menuSelector), back_link = $(element).hasClass('back_link') ? true : false, $load_container = $(base.o.loadContainer); // change selected class base.$waSlideMenu .find(base.o.itemSelector) .filter('.' + base.o.selectedClass) .removeClass(base.o.selectedClass); if (back_link) { base.$currentMenuElement = base.$currentMenuElement .closest(base.o.menuSelector) .closest(base.o.itemSelector); } // add 'selected' class base.$currentMenuElement.addClass(base.o.selectedClass); if (base.o.loadOnlyLatest === false) { base.loadContent($load_container, url); } else if (base.o.loadOnlyLatest && $menu_children.length === 0 && depth > 0) { base.loadContent($load_container, url); } // onLatestClick callback if ($menu_children.length === 0 && depth > 0) { if (base.o.onLatestClick && typeof (base.o.onLatestClick) === 'function') { base.o.onLatestClick.apply(element); } base.$waSlideMenu.trigger('onLatestClick.' + base.o.namespace + pluginName); } // if we can go deeper or up if ($menu_children.length > 0 || depth < 0) { base.gotoSelected(depth, true); } }; base._menuDown = function (e) { base._menuItemClicked(this, e, 1); }; base._menuUp = function (e) { base._menuItemClicked(this, e, -1); }; base._remove = function () { base.$items.off('click', 'a', base._menuDown); base.$waSlideMenu.removeClass(base.o.classNames.navigationClass); if (base.o.autoHeightMenu) { base.$waSlideMenu.css('height', 'initial'); } if (base.o.minHeightMenu > 0) { base.$waSlideMenu.css('min-height', 'initial'); } base.$rootMenu.removeClass(base.o.classNames.allMenusClass) .prependTo(base.$waSlideMenu); base.$inheritedMenus.removeClass(base.o.classNames.allMenusClass + ' ' + base.o.classNames.inheritedMenuClass); base.$inheritedMenus.css('opacity', ''); $.each(base.$backs, function (index, back) { back.remove(); }); base.$movable.remove(); base.$waSlideMenu.removeData(pluginName); }; base.exec = function(func) { if (base.hasOwnProperty(func) && typeof base[func] === 'function') { base[func].call(); } }; base.destroy = function () { base._remove(); }; base.init = function () { base._setup(); $.each(base.$backs, function (index, back) { back.on('click', 'a', base._menuUp); }); base.$items.on('click', 'a', base._menuDown); if (!!(window.history && history.pushState)) { window.onpopstate = function (event) { if (event && event.state) { location.reload(); } }; } var $selectedItem = base.$waSlideMenu .find('.' + base.o.selectedClass) .first(); if ($selectedItem.length) { base.$currentMenuElement = $selectedItem; var $url = base.$currentMenuElement.children('a').first(), depth = $selectedItem.parentsUntil('.' + base.o.classNames.navigationClass).filter(base.o.itemSelector).length, $selectedItemChildrenLen = $selectedItem.children(base.o.menuSelector).length; if ($.inArray($url.attr('href'), base.o.excludeUri) < 0) { // if we have menus inside current element if ($selectedItemChildrenLen > 0) { // slide to them depth += 1; } base.gotoSelected(depth, false); // heightFix hack if we show last menu base._heightFix($selectedItemChildrenLen); } } // onInit callback if (base.o.onInit && typeof (base.o.onInit) === 'function') { base.o.onInit(base); } base.$waSlideMenu.trigger('onInit.' + base.o.namespace + pluginName); }; var oldBase = $(el).data(pluginName); if (typeof oldBase === 'object') { $.each(options, function (k, v) { if (typeof oldBase[k] === 'function') { oldBase[k](v); } else if (oldBase.o.hasOwnProperty(k)){ oldBase.o[k] = v; } }); } else { base.init(); base.o.afterLoad(base); } }; $.waSlideMenu.defaults = { namespace : 'wa', slideSpeed : 200, slideEasing : 'linear', backLinkContent : 'Back', backOnTop : false, selectedClass : 'selected', loadContainer : '', minHeightMenu : 0, autoHeightMenu : true, excludeUri : ['/', '#'], loadOnlyLatest : false, menuSelector : 'ul', itemSelector : 'li', setTitle : false, scrollToTopSpeed : 0, /* Callbacks */ onInit : null, onSlideForward : null, onSlideBack : null, onLatestClick : null, afterSlide : null, beforeLoad : null, afterLoad : null, afterLoadAlways : null, afterLoadDone : null, afterLoadFail : null, /* class names */ classNames: { navigationClass : '-nav', wrapperClass : '-wrapper', allMenusClass : '-menu', inheritedMenuClass : '-inheritedmenu', menuItemBackClass : '-back', loadingClass : '-loading' } }; // $.waSlideMenu.defaults $.fn.waSlideMenu = function (key, val) { return this.each(function () { var options; // Allow for passing in an object or a single key and value if (typeof key !== 'object' && typeof val !== 'undefined') { options = {}; options[key] = val; } else { options = key; } var t = new $.waSlideMenu(this, options); }); // this.each }; // $.fn.waSlideMenu var preWidth = window.innerWidth; $('.spNavBox01_item').each(function(index, element) { if($(element).children('.spNavBox01_list').length > 0) { $(element).children('a').addClass('arrow'); } if($(element).children('a').attr('target')) { $(element).children('a').addClass('link'); } }); function findClickLists(element) { var lists = []; var item = $(element); while(true) { parentItem = $(item).parent('.spNavBox01_list').parent('.spNavBox01_item'); var link = $(parentItem).find('a:first'); if (parentItem.length == 0) { break; } lists.unshift(link); item = parentItem; } return lists; } $('.loader').css('display','none'); $('.modal-wrap').fadeIn(); setNav();function setNav(){if(!$(".spNavBox01_item .itemWrapper").length){$("#spNavBox01 a").wrapInner('')}var a=location.pathname;$("#spNavBox01").waSlideMenu({scrollToTopSpeed:300,onLatestClick:function(){if($(this).attr("target")){window.open($(this).attr("href"),"_blank")}else{window.location.href=$(this).attr("href")}},afterLoad:function(c){var b=false;var d=location.pathname;$('li[class^="spNavBox01_item"] a').each(function(f,g){if($(g).attr("href")&&$(g).attr("href")==d){if($menu_array.indexOf($(g).attr("href"))!=-1){$(g).next(".spNavBox01_list").remove();$(g).removeClass("arrow")}var e=findClickLists($(g).parent());var i=500;e.forEach(function(j){setTimeout(function(){if($menu_array.indexOf($(j).attr("href"))!=-1){b=true;$(j).parent(".spNavBox01_item").addClass("select");$(j).next(".spNavBox01_list").remove();$(j).removeClass("arrow")}if(!b){$(j).click()}},i);i+=500});var h=$(g).parent('li[class^="spNavBox01_item"]:first');h.addClass("select")}});$('li[class^="spNavBox01_item"] a').each(function(e,f){if($menu_array.indexOf($(f).attr("href"))!=-1){$(f).next(".spNavBox01_list").remove()}})}})}; }).fail(function (jqXHR, textStatus, errorThrown) { console.log("ajax通信に失敗しました"); }); }catch (e) { } });