12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- var onitirDoc;
- (function($) {
- // 返回顶部显示与隐藏
- var $back_to_up = $('#scroll-up');
- $back_to_up.css({'visibility': 'hidden','opacity':'0'});
- $(window).scroll(function(){
- var scroH = $(window).scrollTop();
- if (scroH > 700){
- $back_to_up.css({'visibility': 'visible','opacity':'1'});
- }else{
- $back_to_up.css({'visibility': 'hidden','opacity':'0'});
- }
- });
- '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();
- });
- // Sticky Header
- $(window).on('scroll', function() {
- var scroll = $(window).scrollTop();
- if (scroll < 110) {
- $('header.sticky-header').removeClass('sticky');
- } else {
- $('header.sticky-header').addClass('sticky');
- }
- })
- })(jQuery)
- function toTrade() {
- window.location.href = "./trade/index.html"
- }
- function toNews() {
- window.location.href = "../../news/index.html"
- }
|