function gotop() { $(window).scroll(function(e) { $(console.log($(window).scrolltop())); //��������붥������100Ԫ�� if($(window).scrolltop()>100) { $("#gotop").fadein(1000);//��1��ļ�����id=gotop��Ԫ�� } else { $("#gotop").fadeout(1000);//��1��ļ�����id=gotop��Ԫ�� } }); }; $(function() { $('.yb_conct').mouseenter(function() { $(this).css('right', '2px'); $(this).find('.yb_ercode').css('height', '200px'); }).mouseleave(function() { $(this).css('right', '-127px'); $(this).find('.yb_ercode').css('height', '53px'); }) $(".yb_top").click(function(e) { //��1��ļ����ض��� $('body,html').animate({scrolltop:0},1000); }); var advbox = $(".advbox img"); var advboxwidth = advbox.width(); if (advboxwidth != 0) { //showad(); } else { var advbox = $(".advbox img").load(function() { showad(); }); } /* if($(window).scrolltop()>100) { $("#gotop").show(); } else { $("#gotop").hide();//��1��ļ�����id=gotop��Ԫ�� } //����ص�������Ԫ�� $("#gotop").click(function(e) { //��1��ļ����ض��� $('body,html').animate({scrolltop:0},1000); }); gotop();//ʵ�ֻص�����Ԫ�صľ����뽥�� */ $('#search').focusin(function() { $(this).parent().addclass("hover"); }).focusout(function() { $(this).parent().removeclass("hover"); }) var imagelayer = null; $('[hover-pic]').hover(function() { var img = $(this).attr('hover-pic'); $(this).css('position', 'relative'); if (!imagelayer) { imagelayer = $('
') } console.log($(this).width()); imagelayer.css('left', ($(this).width() + 5) + 'px'); imagelayer.css('top', '0'); $(this).append(imagelayer); }, function() { if(imagelayer) { imagelayer.remove(); } }) $('.form-control-feedback').click(function() { $('#search').focus(); if(!$("#search").val()){ alert("������ؼ���!"); return false; } $(this).parents('form').submit(); }) $(document).off('click.bs.tab.data-api', '[data-hover="tab"]'); $(document).on('mouseenter.bs.tab.data-api', '[data-toggle="tab"], [data-hover="tab"]', function () { $(this).tab('show'); }); /* $("#banner-slider").owlcarousel({ navigation : true, // show next and prev buttons slidespeed : 300, paginationspeed : 400, singleitem:true, navigationtext: [ "", "" ], }); $('#solution-slider').owlcarousel({ items:6, navigation: true, pagination: false, navigationtext: [ "", "" ] }); $('#product-nav-slider').owlcarousel({ items:5, navigation: true, pagination: false, navigationtext: [ "", "" ] }); $('.placeholder').owlcarousel({ items:5, navigation: false, pagination: false }); $('.products .image img').cover({loadhidden: false}); $('.banner img').cover(); $('.cover').cover(); $('.coverimg').each(function(i, v) { $(v).hide(); var ph = $(v).parent().height(); var pw = $(v).parents('.frame').width(); $("") .attr("src", $(v).attr('src')) .load(function() { var w = this.width; var h = this.height; if (w > pw || h > ph) { if (w/pw >= h/ph) { h = h/w * pw; w = pw; } else { w = w/h * ph; h = ph; } } $(v).css("width", w + 'px'); $(v).css("height", h + 'px'); if (h < ph) { $(v).css("margin-top", (ph - h)/2 + 'px') } }); $(v).show(); }); $('.menu-link').bigslide({side: "right", menuwidth: "280px"});*/ $('.solution-summary .solution').hover(function() { $('.solution-summary .solution').addclass("gray"); $(this).removeclass("gray"); }); // $('#product-menu').hover(function() { // $('.product-nav').addclass("active"); // }); $('.top-nav div.item a').hover(function() { if ($(this).attr("id") == "product-menu") { $('.product-nav').addclass("active"); } else { $('.product-nav').removeclass("active"); } }); $('.top-nav').on('mouseleave', function() { $('.product-nav').removeclass("active"); }) })