orderSubmit.js
2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
define(function( require, exports, module ) {
var _Pophint = require( 'pophint' );
require( 'fancybox' );
// require( 'pickDtae' );
require( 'region' );
$( function(){
// 删除联系人
$( '.d-remove' ).click(function(){
new _Pophint( this,{
operation: function( target ){
//确定要执行的操作
$( target ).parents( 'li' ).remove();
},
content: "确定要删除吗?",
showButton:true
});
});
//联系人 弹层
$( '.fancybox' ).fancybox({
scrolling: 'visible'
});
// // 日期选择
// $( '.view-delivery' ).each(function(){
// new PickDtae( this , '2014/8/6 08:40', 66, function(k, y){
// console.log(k+'==='+y);
// });
// });
//日期选择
region.start();
//配送方式切换
$( ".different-type" ).click( function(){
var href = $(this).attr("href");
$(".delivery-address-area").hide();
$(href).show();
} );
//提交订单弹框
$( '.ds-operation .submitBtn' ).click(function(){
new _Pophint( this,{
operation: function( target ){
//确定要执行的操作
$( target ).parents( 'li' ).remove();
},
content: $('.some-invalid').html(),
showButton: true,
onName: '继续提交'
});
});
});
var Scrolls = function(){
var $window = $(window);
var $fixedName = $(".order-table"),
$suspend = $(".suspend");
var initScroll = parseInt($fixedName.position().top);
function listen(){
$window.scroll( function(){
var _t = parseInt($(this).scrollTop());
if ( _t > initScroll ){
$suspend.show();
}else {
$suspend.hide();
}
} );
};
return {
listen: listen
};
};
var scrollTab = Scrolls();
scrollTab.listen();
});