supplyPublish.js
794 Bytes
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
define(function( require, exports, module ) {
/*
引入包
*/
require( 'region' );
require( 'validate' );
require( 'validate.extend' );
$(function(){
//开启品种选择框
region.start();
//表单验证
if( $( '.s-validate' ).length > 0 ){
require.async(['validate.extend'], function() {
$( '.s-validate' ).validate({
submitHandler: function(){
alert(1);
}
});
});
};
//删除已上传图片
$( '.li-img' ).live({
mouseenter: function(){
$(this).find( '.img-remove' ).show();
},
mouseleave: function(){
$(this).find( '.img-remove' ).hide();
}
});
$( '.img-remove' ).live( "click" ,function(){
$(this).parent().remove();
} );
});
});