笔记js

http://www.jq22.com/demo/jdtime-141112205749/


 <!--选择地区-->
        <section class="express-area">
            <a id="expressArea" href="javascript:void(0)">
                <dl>
                    <dt>选择地区:</dt>
                    <dd>省 > 市 > 区/县</dd>
                </dl>
            </a>
        </section>
        <!--选择地区弹层-->
        <section id="areaLayer" class="express-area-box" style="bottom: -100%;position: fixed;left: 0;height:100%;width: 100%;margin-left: 0;z-index:9999;">
            <header>
                <h3>选择地区</h3>
                <a id="backUp" class="back" href="javascript:void(0)" title="返回"></a>
                <a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
            </header>
            <article id="areaBox">
                <ul id="areaList" class="area-list"></ul>
            </article>
        </section>
        <!--遮罩层-->
        <div id="areaMask" class="mask"></div>


function clockArea() {
	$("#areaMask").fadeOut();
	$("#areaLayer").animate({"bottom": "-100%"});
	intProvince();
}

$(function() {
	/*打开省市区选项*/
	$("#expressArea").click(function() {
		$("#areaMask").fadeIn();
		$("#areaLayer").animate({"bottom": 0});
	});
	/*关闭省市区选项*/
	$("#areaMask, #closeArea").click(function() {
		clockArea();
	});
});
 
$("#aDatePicker").click(function(){
  $("#m-calendar").animate({"bottom": "0"},300);
  $(document.body).css({
   "overflow-x":"hidden",
   "overflow-y":"hidden"
   });
});

天数计算:total_ruzhu = (new Date(eDate)-new Date(sDate))/(1*24*60*60*1000)+1;


//滚动改变值

 $(".ta_calendar_cont").scroll(function(){
      // 获得窗口滚动上去的距离
      var ling = $(".ta_calendar_cont").scrollTop();
      // 在标题栏显示滚动的距离
      document.title = ling;
      if(ling<$('.ta_calendar_cont table').eq(0).height()){
        $('.ta_calendar_cont table').find('caption').hide();
        $('.ta_calendar_cont table').eq(0).find('caption').show();
      }else if(ling>$('.ta_calendar_cont table').eq(1).height() ||ling<$('.ta_calendar_cont table').eq(2).height()){
        alert('bb');
        $('.ta_calendar_cont table').find('caption').hide();
        $('.ta_calendar_cont table').eq(2).find('caption').show();
      }else if(ling>$('.ta_calendar_cont table').eq(2).height() ||ling<$('.ta_calendar_cont table').eq(3).height() ){
        $('.ta_calendar_cont table').find('caption').hide();
        $('.ta_calendar_cont table').eq(3).find('caption').show();
      }else if(ling>$('.ta_calendar_cont table').eq(3).height() ||ling>$('.ta_calendar_cont table').eq(4).height()){
        $('.ta_calendar_cont table').find('caption').hide();
        $('.ta_calendar_cont table').eq(4).find('caption').show();
      }else if(ling>$('.ta_calendar_cont table').eq(4).height()){
        $('.ta_calendar_cont table').find('caption').hide();
        $('.ta_calendar_cont table').eq(5).find('caption').show();
      }
      
    })


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值