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
| (function ($) {
|
| var anim;
|
| $.mobiscroll.themes.wp = {
| defaults: {
| width: 70,
| height: 76,
| accent: 'none',
| dateOrder: 'mmMMddDDyy',
| onAnimStart: function (dw, i, time) {
| $('.dwwl' + i, dw).addClass('wpam');
| clearTimeout(anim[i]);
| anim[i] = setTimeout(function () {
| $('.dwwl' + i, dw).removeClass('wpam');
| }, time * 1000 + 100);
| }
| },
| init: function (elm, inst) {
| var click,
| active;
|
| anim = {};
|
| $('.dw', elm).addClass('wp-' + inst.settings.accent);
|
| //$('.dwwl', elm).bind('touchstart mousedown DOMMouseScroll mousewheel', function () {
| $('.dwwl', elm).delegate('.dw-sel', 'touchstart mousedown DOMMouseScroll mousewheel', function () {
| click = true;
| active = $(this).closest('.dwwl').hasClass('wpa');
| $('.dwwl', elm).removeClass('wpa');
| $(this).closest('.dwwl').addClass('wpa');
| }).bind('touchmove mousemove', function () {
| click = false;
| }).bind('touchend mouseup', function () {
| if (click && active) {
| $(this).closest('.dwwl').removeClass('wpa');
| }
| });
| }
| };
|
| $.mobiscroll.themes['wp light'] = $.mobiscroll.themes.wp;
|
| })(jQuery);
|
|