123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- var onitirDoc;
- (function($) {
- 'use strict';
- onitirDoc = {
- init: function() {
- this.mobileMenu();
- this.productGird();
- },
- // Mobile Menu
- mobileMenu: function() {
- $('.mainmenu-area .main-menu .menu-items').meanmenu({
- meanMenuContainer: '.mobile-menu',
- meanScreenWidth: '991',
- meanRevealPosition: 'right',
- });
- },
- // Porduct Grid
- productGird: function() {
- var grid = jQuery('.grid-isotope');
- if (!grid.length) {
- return;
- }
- grid.isotope();
- jQuery('.grid-filter ul').on('click', 'li', function() {
- var filterValue = jQuery(this).attr('data-filter');
- grid.isotope({ filter: filterValue });
- });
- jQuery('.grid-filter ul li').on('click', function(event) {
- jQuery(this).siblings('.active').removeClass('active');
- jQuery(this).addClass('active');
- event.preventDefault();
- });
- }
- };
- // Document Ready
- $(document).ready(function() {
- onitirDoc.init();
- //首页下箭头点击事件
- var $wh = $(window).height();
- $('.go_down').click(function (e) {
- $('html,body').animate({
- scrollTop: $(window).height()
- }, 700);
- });
- });
-
- $(window).on('scroll', function() {
- // Sticky Header
- var scroll = $(window).scrollTop();
- if (scroll < 110) {
- $('header.sticky-header').removeClass('sticky');
- } else {
- $('header.sticky-header').addClass('sticky');
- }
- //返回顶部按钮的显示与隐藏
- if (scroll > 700){
- $('#scroll-up').css({'visibility': 'visible','opacity':'1'});
- }else{
- $('#scroll-up').css({'visibility': 'hidden','opacity':'0'});
- }
- })
- //百度统计
- var _hmt = _hmt || [];
- (function() {
- var hm = document.createElement("script");
- hm.src = "https://hm.baidu.com/hm.js?082d841c5adb911dd14595d0885a7c69";
- var s = document.getElementsByTagName("script")[0];
- s.parentNode.insertBefore(hm, s);
- })();
- })(jQuery)
|