1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- $(function(){
- var t1 = null;//这个设置为全局
- var myScroll;
- /*滚动区域事件*/
- myScroll = new IScroll(".gZdangan_iscroll",{
- scrollbars: true,
- fadeScrollbars:true,
- scrollbars: 'custom',
- shrinkScrollbars:'clip',
- });
- /*滚动区域的刷新事件*/
- setTimeout(function () {
- myScroll.refresh();
- }, 100);
- /* 图标切换*/
- $(".dropdownBtn").on("tap",function(e){
- if(e.preventDefault){
- e.preventDefault();
- }else{
- event.returnValue = false;
- }
- if(e.stopPropagation){
- e.stopPropagation();
- }else{
- event.cancelBubble = true;
- }
- //解决tap两次出发的方法(500是2次点击时间差,单位ms)
- if (t1 == null){
- t1 = new Date().getTime();
- }else{
- var t2 = new Date().getTime();
- if(t2 - t1 < 500){
- t1 = t2;
- return;
- }else{
- t1 = t2;
- }
- }
-
- $(this).children().toggleClass("dropup");
- $(this).parent().toggleClass("addColor");
- $(this).parent().next().slideToggle (500,function(){
- setTimeout(function(){
- myScroll.refresh();
- }, 100);
- });
- });
-
- //touchmove的阻止浏览器或者屏幕滚动默认事件
- document.addEventListener("touchmove", function (e) {
- e.preventDefault();
- }, false);
-
- haifmp.loadMobilePage("chartA", "getZzwdMain.htm?dweb=" + $("#dweb").val());
- });
- //返回事件
- function backUrl() {
- if ($("#fromtt").val() != 'zztt') {//来自档案
- haifmp.loadMobilePage("haifm", "hpSjlrDaIndex.htm?mcid=" + $("#mcid").val() + "&ztsl=" + $("#ztsl").val());
- } else {//来自淘汰
- haifmp.loadMobilePage("haifm", "hpSjlrZzttIndex.htm?mcid=" + $("#mcid").val());
- }
- }
- function edit() {
- haifmp.loadMobilePage("haifm", "hpSjlrGzdaAdd.htm?mcid=" + $("#mcid").val() + "&dweb=" + $("#dweb").val() + "&edit=" + "edit");
- }
|