$(function(){ $("..main_top .mall").hover(function(){$(this).find("ul").fadeIn();},function(){$(this).find("ul").slideUp();}); }); $(document).ready(function(){ var a=3000; var x=460; //浣嶇Щ鍍忔暟 var t; var y=0; function sfs(){ u=$(".prod_l").width(); if (u+y-1000>0){ t=y-x; if (u+t<240){ t=x-u $(".prod_l").animate({left:t}); y=0-u }else{ $(".prod_l").animate({left:t}); y=t; } } else{ $(".prod_l").animate({left:0}); y=0; } } $(".case_left").click(function(){ clearInterval(q); u=$(".prod_l").width(); if (y<0){ t=y+x; if (t0){t=0}; $(".prod_l").animate({left:t}); y=t; }else{ z=0-u+x*2 $(".prod_l").animate({left:z}); y=z; } q=setInterval(sfs,a); }); $(".case_right").click(function(){ clearInterval(q); sfs(); q=setInterval(sfs,a); }); q=setInterval(sfs,a); $(".prod_l").mouseover(function(){ clearInterval(q); }); $(".prod_l").mouseout(function(){ q=setInterval(sfs,a); }); }); $(document).ready(function(){ //siblings var e=$(".b_productlist li"); e.hover( function(){ $(this).animate({opacity:'0.7'}); },function(){ $(this).animate({opacity:'1'}); } ); }); //下拉菜单 b_productlist //=================================================================== $(document).ready(function(){ //siblings var times; var e=$(".bjimg"); var winWidth = $(window).width(); var yn=e.offset().left; var yy=(winWidth-1000)/2; $('.nav').find('li').hover( function(){ var o=$(this); var z=$(this).width(); var y=$(this).offset().left; sc=$(this).parent('td').attr("bgcolor"); twt=$(this).width(); o.addClass("monnn_yes"); o.siblings('li').children('ul').slideUp("fast"); var x=o.children('ul').width(); var xk=$('.nav').width(); var xl=$(this).offset().left-$('.nav').offset().left; //alert(xk-xl-15); if (x>xk-xl-15){ o.children('ul#top').css(' width',x); o.children('ul#top').css('left',xk-x-20); }else{ o.children('ul#top').css(' width',x); o.children('ul#top').css('left',xl+10); }; o.children('ul#top').css("background",sc); o.children('ul').fadeIn("fast"); clearTimeout(times); }, function(){ var o=$(this); o.removeClass("monnn_yes"); o.children('ul').fadeOut("fast") times=setTimeout(function(){ },1000); } ); $('.nav').find('li#mainlevel_01').hover( function(){ e.stop(); var y=$(this).offset().left; yyy=y-yy; e.animate({ left:yyy },"fast"); }, function(){ e.animate({ left:yn-yy },"fast"); } ); var times2; $('.point1').children('li').hover( function(){ var o=$(this); o.addClass("monnn_yes"); o.siblings('li').children('ul').slideUp("fast"); o.children('ul').slideDown("fast"); clearTimeout(times2); }, function(){ var o=$(this); o.removeClass("monnn_yes"); times2=setTimeout(function(){ o.children('ul').slideUp("fast") },4000); } ); // $('.point1').children('li').mousemove(function(){ // $(this).find('ul').slideDown("slow");//you can give it a speed // }); // $('.point1').children('li').mouseleave(function(){ // $(this).find('ul').slideUp("slow"); // }); // }); //下拉菜单 //=================================================================== stuHover = function() { var cssRule; var newSelector; for (var i = 0; i < document.styleSheets.length; i++) for (var x = 0; x < document.styleSheets[i].rules.length ; x++) { cssRule = document.styleSheets[i].rules[x]; if (cssRule.selectorText.indexOf("LI:hover") != -1) { newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover"); document.styleSheets[i].addRule(newSelector , cssRule.style.cssText); } } var getElm = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i '); document.write(''); document.write(' '); document.write(' '); document.write(' '); //document.write(' '); document.write(' '); document.write(' '); document.write(' '); } //****************************** http://www.tdcagolf.com/图片规则 var flag=false; function DrawImage(ImgD,imgW,imgH){ var image=new Image(); var iwidth = imgW; //定义允许http://www.tdcagolf.com/图片宽度 var iheight = imgH; //定义允许http://www.tdcagolf.com/图片高度 image.src=ImgD.src; if(image.width>0 && image.height>0){ flag=true; if(image.width/image.height>= iwidth/iheight){ if(image.width>iwidth){ ImgD.width=iwidth; ImgD.height=(image.height*iwidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } //ImgD.alt=image.width+"×"+image.height; } else{ if(image.height>iheight){ ImgD.height=iheight; ImgD.width=(image.width*iheight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } //ImgD.alt=image.width+"×"+image.height; } } } //调用: //****************************** 跳转 function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } //刷新验证码 $(function(){ $("img.code").click(function(){ //alert("asdf"); yy=$(this).attr("src")+"?"+Math.random(); $(this).attr("src",yy) }); }) // 加入收藏 兼容360和IE6 function SetHome(obj,vrl){ try{ obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl); } catch(e){ if(window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (e) { alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。"); } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',vrl); }else{ alert("您的浏览器不支持,请按照下面步骤操作:1.打开浏览器设置。2.点击设置网页。3.输入:"+vrl+"点击确定。"); } } } function shoucang(sTitle,sURL) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("加入收藏失败,请使用Ctrl+D进行添加"); } } }