| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- $(function () {
- // menu
- $(".m-header i").click(function () {
- $(".mob-navigation").addClass("on");
- $("body").css('overflowY','hidden');
- });
- $(".mob-navigation .home").click(function () {
- $(".mob-navigation").removeClass("on");
- $("body").css('overflowY','scroll');
- });
- $('.ziliao,.zixun').click(function () {
- document.getElementById('liuyanForm').reset();
- $(".spot-bg").css("display", "block");
- $('.fixed-foot').addClass('fixed-foot-on');
- })
- $(".spot-bg,.fixed-foot i").click(function () {
- $(".spot-bg").css("display", "none");
- $('.fixed-foot').removeClass('fixed-foot-on');
- })
- $(".trade-nav-l ul li").click(function(){
- var index = $(this).index();
- console.log(index)
- $(this).addClass('on').siblings().removeClass('on');
- $(".trade-nav-r .trade-list-box").eq(index).addClass('on').siblings().removeClass('on');
- })
- $("img.lazyload").lazyload();
- // 回顶部
- $('.go-top').click(function () {
- $('body,html').animate({ scrollTop: 0 });
- })
- $(window).scroll(function () {
- var oTop = document.body.scrollTop == 0 ? document.documentElement.scrollTop : document.body.scrollTop;
- if (oTop > 200) {
- $('.go-top').fadeIn();
- } else {
- $('.go-top').fadeOut();
- }
- })
- })
|