You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.4 KiB
JavaScript
89 lines
2.4 KiB
JavaScript
// 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);
|
|
});
|
|
|
|
});
|
|
|
|
function ShowHideTr(e)
|
|
{
|
|
|
|
var eimg =$(e).parent().find('img'), be = eimg.attr('src').indexOf('down') > 0;
|
|
|
|
$(e).parent().parent().parent().find('tr[name]').toggle(be);
|
|
if(be)
|
|
{
|
|
eimg.attr("src","/css/images/hotel/double-arrow-up.png");
|
|
}
|
|
else
|
|
{
|
|
eimg.attr("src","/css/images/hotel/double-arrow-down.png");
|
|
}
|
|
}
|
|
|
|
function showHideLocation(e)
|
|
{
|
|
var eimg =$(e).find('img'),textStr = $("#localMore"),Obj = $(".hideLocation");
|
|
if(Obj.css("display")=="block")
|
|
{
|
|
Obj.css("display","none");//Obj.hide();
|
|
textStr.html("More Location Select<img src=\"/css/images/hotel/double-arrow-down.png\" align=\"absmiddle\">");
|
|
//eimg.attr("src","/css/images/hotel/double-arrow-down.png");
|
|
}
|
|
else
|
|
{
|
|
Obj.css("display","block");
|
|
textStr.html("Less Location Select<img src=\"/css/images/hotel/double-arrow-up.png\" align=\"absmiddle\"");
|
|
//eimg.attr("src","/css/images/hotel/double-arrow-up.png");
|
|
}
|
|
|
|
}
|
|
|
|
//==============
|
|
var loading = true; //是否正在加载
|
|
//切换左边的菜单
|
|
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(){
|
|
$.ajax({
|
|
type:"post",
|
|
data:$("#listCondition").serialize(),
|
|
url:"/hotel/ajax-hotel-list.asp",
|
|
beforeSend:function(){loading = true;},
|
|
complete:function(){loading = false;},
|
|
success:function(msg){
|
|
$("#contentRight2").html(msg).hide().slideDown(2000);
|
|
}
|
|
});
|
|
|
|
}
|
|
//ajax 翻页
|
|
function goToPage(p){
|
|
$("#listCondition #page").val(p);
|
|
$("#contentRight2 ").children().hide();
|
|
$(document).scrollTop(350);
|
|
$("#contentRight2").append("<img src=\"/pic/horloading.gif\" style=\"padding:100px;\"/>");
|
|
subFTForm();
|
|
} |