/*����*/ $(function() { var urlName = window.location.pathname; //��ȡ��ַ�����ļ�����·���� $('.L_list_box .L_more').each(function() { //������ǰ��ҳ��������� var urlHref = $(this).attr('href'); //��ȡ�������ӵ�ַhrefֵ if (urlName.indexOf(urlHref)>=0) { //����ļ�����·�����Ƿ������ǰ����ֵ $(this).addClass('active'); } }); }); /*������»������ϵ��¼� var b_scroll = 0; $(window).on('scroll', function () { console.log(0); var n_scroll = $(window).scrollTop(); var differH = n_scroll - b_scroll; if(n_scroll <= 65 ){ $("#c_portalResnav_main-15616909979498496 .header2").css("top","0px"); }else if (differH < 0) { $("#c_portalResnav_main-15616909979498496 .header2").css("top","0px"); }else{ $("#c_portalResnav_main-15616909979498496 .header2").css("top","-65px"); } b_scroll = n_scroll; }); */ /*��ֹF12 window.onkeydown = window.onkeyup = window.onkeypress = function (event) { // �ж��Ƿ���F12��F12����Ϊ123 if (event.keyCode == 123) { event.preventDefault(); // ��ֹĬ���¼���Ϊ window.event.returnValue = false; } }; */ /*��ֹ�Ҽ� window.oncontextmenu = function() { event.preventDefault(); // ��ֹĬ���¼���Ϊ return false; }; */ $('a[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top - 100 }, 1000); return false; } } }); $(function(){ var li_h= window.location.pathname; $(".neiBanner .neiBannerList").each(function(){ // 遍历a链接的路径 var aLinkUrl = $(this).attr("data-href"); // 得到a链接的路径 if(aLinkUrl == li_h){ $(this).removeClass("jpHide"); } }); });