You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/Mobile/Viewsjs/mobiscroll/dev/js/mobiscroll.wp-2.5.2.js

48 lines
1.5 KiB
JavaScript

(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);