// JavaScript Document $(function(){ var sdates = $("#hotelstarttime,#hotelendtime").datepicker({showAnim:"fadeIn",duration:0,minDate: 0, maxDate:"2y",numberOfMonths: 3,showButtonPanel: true}); shcity= $("a[name='city']"); $("#hotelcityList a").click(function(){ $("#citys").val($(this).text()); shcity.text($(this).text()); $("#hotelcityList").hide(); }); $("a[name='city']").click(function(){ $("#hotelcityList").fadeIn(200); }); $(".closeIt").click(function(){ $("#hotelcityList").fadeOut(200); }); var mapdiv = $("#mapEara"), mapbtn=$("#ShowHotelMap"); $(".mapcontrolButton").click(function(){ if(mapbtn.text()=="Close Map") { mapdiv.slideUp(600); mapbtn.text("Show Map"); } else { mapdiv.slideDown(600); mapbtn.text("Close Map"); } }); }); function ShowHideTr(e) { $(e).find("img").toggle(); $(e).parents("tbody").find('tr[name]').toggle(); } //切换左边的菜单 function Togle(obj,id){ var mObj = $(obj); var sObj = $("#"+id); if(sObj.is(":hidden")){ sObj.slideDown("slow"); mObj.removeClass("filtercategoryclose").addClass("filtercategory"); }else{ sObj.slideUp("slow"); mObj.removeClass("filtercategory").addClass("filtercategoryclose"); } } //提交隐藏的表单 function subFTForm(inputID,val){ var Obj = $("#listCondition #"+inputID); Obj.val(val); $("#listCondition").trigger("submit"); }