$(function(){ $('.years-box').click(function(){ $this = $(this) $this.siblings('ul').stop(true,true).slidetoggle(); $this.find('.icon').toggleclass('xz') }) $('.years ul li').click(function(){ $this = $(this) $this.parents('ul').stop(true,true).slidetoggle(); $('.years-value').text($this.text()) $('.years-box').find('.icon').toggleclass('xz') }) $('.month-box').click(function(){ $this = $(this) $(this).siblings('ul').stop(true,true).slidetoggle(); $this.find('.icon').toggleclass('xz') }) $('.month ul li').click(function(){ $this = $(this) $this.parents('ul').stop(true,true).slidetoggle(); $('.month-value').text($this.text()) $('.month-box').find('.icon').toggleclass('xz') }) $('.sort-box').click(function(){ $this = $(this) $(this).siblings('ul').stop(true,true).slidetoggle(); $this.find('.icon').toggleclass('xz') }) $('.sort ul li').click(function(){ $this = $(this) $this.parents('ul').stop(true,true).slidetoggle(); $('.sort-value').text($this.text()) $('.sort-box').find('.icon').toggleclass('xz') }) $__w.click(function (e) { $this = $(e.target); if (!$(".years ul").is(":hidden") && !$this.hasclass("years-box") && !$this.hasclass("years-value") && !$this.hasclass("n1")) { $('.years ul').stop(true,true).slideup(); $('.years-box').find('.icon').removeclass('xz') } if (!$(".month ul").is(":hidden") && !$this.hasclass("month-box") && !$this.hasclass("month-value") && !$this.hasclass("n1")) { $('.month ul').stop(true,true).slideup(); $('.month-box').find('.icon').removeclass('xz') } if (!$(".sort ul").is(":hidden") && !$this.hasclass("sort-box") && !$this.hasclass("sort-value") && !$this.hasclass("n1")) { $('.sort ul').stop(true,true).slideup(); $('.sort-box').find('.icon').removeclass('xz') } }); $('.filter .button').click(function(){ console.log($('.years-value').text() + $('.month-value').text()) }) if($('.swiper-container').length > 0){ var myswiper = new swiper ('.swiper-container', { direction: 'horizontal', // effect: 'fade', loop: true, parallax: true, speed:800, autoplay : { delay:3000 }, pagination: { el: '.swiper-pagination', type: 'fraction', }, navigation: { nextel: '.swiper-button-next', prevel: '.swiper-button-prev', }, observer:true, observeparents:true, on:{ init:function(){ swiperanimatecache(this); this.emit('transitionend'); }, transitionend: function(){ swiperanimate(this); }, } }); } // $("div.videobtn").click(function() { // // document.getelementbyid("videoshow").src = $(this).parent('.video').children('video').data('src'); // document.getelementbyid("videoshow").play(); // $(this).stop(false, true).fadeout({ // duration: 380, // easing: "easeoutquart" // }); // }); // $("div.videobg").click(function() { // document.getelementbyid("videoshow").pause(); // $("div.videobtn").stop(false, true).fadein({ // duration: 380, // easing: "easeinquart" // }); // }); var top = undefined; $('.video-box .list .item').click(function(){ $('.popups').fadein(300); top = $(window).scrolltop(); $('body').css("top", -top + "px"); $('body').addclass('fixed'); }) $('.main .right .text .button').click(function(){ $('.popups').fadein(300); top = $(window).scrolltop(); $('body').css("top", -top + "px"); $('body').addclass('fixed'); }) $('.video-box .main .left .bg').click(function(){ $('.popups').fadein(300); top = $(window).scrolltop(); $('body').css("top", -top + "px"); $('body').addclass('fixed'); }) $('.popups .close').click(function(){ $('.popups').fadeout(300); $('body').removeclass('fixed'); $('body').removeattr("style"); $(window).scrolltop(top); document.getelementbyid("videoshow").pause(); $("div.videobtn").stop(false, true).fadein({ duration: 380, easing: "easeinquart" }); }) })