$(function() { $(".rslide").responsiveSlides({ auto: true, // Boolean: Animate automatically, true or false speed: 500, // Integer: Speed of the transition, in milliseconds timeout: 8000, // Integer: Time between slide transitions, in milliseconds pauseControls: false, // Boolean: Pause when hovering controls, true or false maxwidth: "760px", // Integer: Max-width of the slideshow, in pixels }); }); $(function(){ var menu = $('#slide_menu'), // スライドインするメニューを指定 menuBtn = $('.slide_menu_button'), // メニューボタンを指定 body = $(document.body), menuWidth = menu.outerWidth(); // メニューボタンをクリックした時の動き menuBtn.on('click', function(){ // body に open クラスを付与する body.toggleClass('open'); if(body.hasClass('open')){ // open クラスが body についていたらメニューをスライドインする body.animate({'right' : menuWidth }, 300); menu.animate({'right' : 0 }, 300); } else { // open クラスが body についていなかったらスライドアウトする menu.animate({'right' : -menuWidth - 1000 }, 300); body.animate({'right' : 0 }, 300); } }); }); // メニュー内子要素を開く var $j = jQuery; $j(function(){ $j(".slide_menu_list02").each(function(){ $j("li.telop > a", this).each(function(index){ var $this = $j(this); $this.next().hide(); $this.click(function(){ var params = {height:"toggle"}; $j(this).next().animate(params).parent().siblings().children("ul:visible").animate(params); $j(this).parent().siblings().children("a.open").removeClass("open"); $j(this).toggleClass("open"); n = $(".slide_menu_list02 li.telop > a").index(this); return false; }); }); }); });