// JavaScript Document $(function(){ $("#wizard").scrollable({ onSeek: function(event,i){ $("#status li").removeClass("active").eq(i).addClass("active"); }, }); }); $('#selection').cxSelect({ url: 'dt.trsports.com.au/script/cityData.js' // 提示:如果服务器不支持 .json 类型文件,请将文件改为 .js 文件 selects: ['range', 'category', 'product'], nodata: 'none' }); $(function(){ $("#range,.category").change(function(){ $("#range option").each(function(i){ if($(this).attr("selected")){ $(".category").hide(); $(".category").eq(i).show(); range=$(".category option:selected").eq(i).text(); vrange=$(".category").eq(i).val(); $(".selected").html("You have selected: "+""+range+". "); } if(vrange === "BS09" || vrange === "BS10" || vrange === "BS12"){ $(".frame option").eq(2).attr("disabled","disabled"); } if(vrange === "BS12"){ $(".frame option").eq(1).attr("disabled","disabled"); $(".frame option").eq(2).attr("disabled","disabled"); $(".cloth option").eq(1).attr("disabled","disabled"); $(".cloth option").eq(2).attr("disabled","disabled"); $(".cloth option").eq(3).attr("disabled","disabled"); $(".cloth option").eq(4).attr("disabled","disabled"); $(".cloth option").eq(5).attr("disabled","disabled"); $(".cloth option").eq(6).attr("disabled","disabled"); $(".cloth option").eq(7).attr("disabled","disabled"); } if(vrange === "BM07" || vrange === "BM08"){ $(".frame option").eq(1).attr("disabled","disabled"); $(".cloth option").eq(5).attr("disabled","disabled"); $(".cloth option").eq(6).attr("disabled","disabled"); $(".cloth option").eq(7).attr("disabled","disabled"); } if(vrange === "BV07" || vrange === "BV08" || vrange === "BO07"){ $(".frame option").eq(1).attr("disabled","disabled"); $(".frame option").eq(2).attr("disabled","disabled"); $(".cloth option").eq(3).attr("disabled","disabled"); $(".cloth option").eq(4).attr("disabled","disabled"); $(".cloth option").eq(5).attr("disabled","disabled"); $(".cloth option").eq(6).attr("disabled","disabled"); $(".cloth option").eq(7).attr("disabled","disabled"); } }); }); $("#range, .category").change(); }); $(function(){ $("#sub").click(function(){ vframe=$(".frame option:selected").val(); vcloth=$(".cloth option:selected").val(); vcode=vrange+vframe+vcloth; var w = window.open(); $.getJSON('http://dt.trsports.com.au/PoolTable/module/sub.php?callback=?', {vcode:vcode}, function(data){ if(data.length > 0){ vlink="http://www.ebay.com.au/itm/"+data; w.location = vlink; }else{ alert('We are sorry, but this item is current on back order. We hope to come back to serve you soon!'); w.close(); } }); }); }); $(document).ready(function(){ $(".next").mouseover(function(){ $(".next").css("background-color","#ff9c00"); }); $(".next").mouseout(function(){ $(".next").css("background-color","#003077"); }); $(".prev").mouseover(function(){ $(".prev").css("background-color","#ff9c00"); }); $(".prev").mouseout(function(){ $(".prev").css("background-color","#003077"); }); }); $(function(){ $("#next2").click(function(){ frame=$(".frame option:selected").text(); cloth=$(".cloth option:selected").text(); $("#summary").html("
Product: | "+range+"; |
Frame Colour: | "+frame+"; |
"+"Felt/Cloth Colour: "+" | "+cloth+"; |