|
@@ -14,8 +14,8 @@
|
|
direction: 'left', //Указывает направление движения содержимого контейнера (left | right | up | down)
|
|
direction: 'left', //Указывает направление движения содержимого контейнера (left | right | up | down)
|
|
loop: -1, //Задает, сколько раз будет прокручиваться содержимое. "-1" для бесконечного воспроизведения движения
|
|
loop: -1, //Задает, сколько раз будет прокручиваться содержимое. "-1" для бесконечного воспроизведения движения
|
|
scrolldelay: 0, //Величина задержки в миллисекундах между движениями
|
|
scrolldelay: 0, //Величина задержки в миллисекундах между движениями
|
|
- scrollamount: 50, //Скорость движения контента (px/sec)
|
|
|
|
- circular: true, //Если "true" - строка непрерывная
|
|
|
|
|
|
+ scrollamount: 10, //Скорость движения контента (px/sec)
|
|
|
|
+ circular: true, //Если "true" - строка непрерывная
|
|
drag: true, //Если "true" - включено перетаскивание строки
|
|
drag: true, //Если "true" - включено перетаскивание строки
|
|
runshort: true, //Если "true" - короткая строка тоже "бегает", "false" - стоит на месте
|
|
runshort: true, //Если "true" - короткая строка тоже "бегает", "false" - стоит на месте
|
|
hoverstop: true, //true - строка останавливается при наведении курсора мыши, false - строка не останавливается
|
|
hoverstop: true, //true - строка останавливается при наведении курсора мыши, false - строка не останавливается
|
|
@@ -31,24 +31,24 @@
|
|
var leaveEvent = 'mouseleave';
|
|
var leaveEvent = 'mouseleave';
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
enterEvent = 'mouseleave';
|
|
enterEvent = 'mouseleave';
|
|
- leaveEvent = 'mouseenter';
|
|
|
|
|
|
+ leaveEvent = 'mouseenter';
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
var
|
|
var
|
|
loop = p.loop,
|
|
loop = p.loop,
|
|
strWrap = $(this).addClass('str_wrap').data({scrollamount:p.scrollamount}),
|
|
strWrap = $(this).addClass('str_wrap').data({scrollamount:p.scrollamount}),
|
|
fMove = false;
|
|
fMove = false;
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- var strWrapStyle = strWrap.attr('style');
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var strWrapStyle = strWrap.attr('style');
|
|
|
|
+
|
|
if(strWrapStyle){
|
|
if(strWrapStyle){
|
|
var wrapStyleArr = strWrapStyle.split(';');
|
|
var wrapStyleArr = strWrapStyle.split(';');
|
|
var startHeight = false;
|
|
var startHeight = false;
|
|
for(var i=0; i < wrapStyleArr.length; i++){
|
|
for(var i=0; i < wrapStyleArr.length; i++){
|
|
- var str = $.trim(wrapStyleArr[i]);
|
|
|
|
|
|
+ var str = $.trim(wrapStyleArr[i]);
|
|
var tested = str.search(/^height/g);
|
|
var tested = str.search(/^height/g);
|
|
if(tested != -1){
|
|
if(tested != -1){
|
|
startHeight = parseFloat(strWrap.css('height'));
|
|
startHeight = parseFloat(strWrap.css('height'));
|
|
@@ -57,18 +57,18 @@
|
|
}
|
|
}
|
|
|
|
|
|
var code = function () {
|
|
var code = function () {
|
|
-
|
|
|
|
|
|
+
|
|
strWrap.off('mouseleave');
|
|
strWrap.off('mouseleave');
|
|
strWrap.off('mouseenter');
|
|
strWrap.off('mouseenter');
|
|
strWrap.off('mousemove');
|
|
strWrap.off('mousemove');
|
|
strWrap.off('mousedown');
|
|
strWrap.off('mousedown');
|
|
strWrap.off('mouseup');
|
|
strWrap.off('mouseup');
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
if(!$('.str_move',strWrap).length){
|
|
if(!$('.str_move',strWrap).length){
|
|
strWrap.wrapInner($('<div>').addClass('str_move'));
|
|
strWrap.wrapInner($('<div>').addClass('str_move'));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
var
|
|
var
|
|
strMove = $('.str_move', strWrap).addClass('str_origin'),
|
|
strMove = $('.str_move', strWrap).addClass('str_origin'),
|
|
strMoveClone = strMove.clone().removeClass('str_origin').addClass('str_move_clone'),
|
|
strMoveClone = strMove.clone().removeClass('str_origin').addClass('str_move_clone'),
|
|
@@ -81,7 +81,7 @@
|
|
var circCloneHor = function(){
|
|
var circCloneHor = function(){
|
|
strMoveClone.clone().css({
|
|
strMoveClone.clone().css({
|
|
left:'100%',
|
|
left:'100%',
|
|
- right:'auto',
|
|
|
|
|
|
+ right:'auto',
|
|
width: strMove.width()
|
|
width: strMove.width()
|
|
}).appendTo(strMove);
|
|
}).appendTo(strMove);
|
|
strMoveClone.css({
|
|
strMoveClone.css({
|
|
@@ -90,7 +90,7 @@
|
|
width: strMove.width()
|
|
width: strMove.width()
|
|
}).appendTo(strMove);
|
|
}).appendTo(strMove);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
var circCloneVert = function(){
|
|
var circCloneVert = function(){
|
|
strMoveClone.clone().css({
|
|
strMoveClone.clone().css({
|
|
top: '100%',
|
|
top: '100%',
|
|
@@ -103,16 +103,16 @@
|
|
height:strMove.height()
|
|
height:strMove.height()
|
|
}).appendTo(strMove);
|
|
}).appendTo(strMove);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if (p.direction == 'left') {
|
|
if (p.direction == 'left') {
|
|
strWrap.height(strMove.outerHeight())
|
|
strWrap.height(strMove.outerHeight())
|
|
if (strMove.width() > strWrap.width()) {
|
|
if (strMove.width() > strWrap.width()) {
|
|
var leftPos = -strMove.width();
|
|
var leftPos = -strMove.width();
|
|
-
|
|
|
|
|
|
+
|
|
if (p.circular) {
|
|
if (p.circular) {
|
|
-
|
|
|
|
|
|
+
|
|
if (!p.xml) {
|
|
if (!p.xml) {
|
|
circCloneHor()
|
|
circCloneHor()
|
|
leftPos = -(strMove.width() + (strMove.width() - strWrap.width()));
|
|
leftPos = -(strMove.width() + (strMove.width() - strWrap.width()));
|
|
@@ -120,7 +120,7 @@
|
|
}
|
|
}
|
|
if (p.xml) {
|
|
if (p.xml) {
|
|
strMove.css({
|
|
strMove.css({
|
|
- left:strWrap.width()
|
|
|
|
|
|
+ left:strWrap.width()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
var
|
|
var
|
|
@@ -161,7 +161,7 @@
|
|
if(!p.inverthover){
|
|
if(!p.inverthover){
|
|
moveFunc1();
|
|
moveFunc1();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if (p.hoverstop) {
|
|
if (p.hoverstop) {
|
|
strWrap.on(enterEvent, function () {
|
|
strWrap.on(enterEvent, function () {
|
|
$(this).addClass('str_active');
|
|
$(this).addClass('str_active');
|
|
@@ -184,15 +184,15 @@
|
|
var newX;
|
|
var newX;
|
|
var oldX = e.clientX;
|
|
var oldX = e.clientX;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
fMove = true;
|
|
fMove = true;
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
newX = e.clientX;
|
|
newX = e.clientX;
|
|
if(newX > oldX){
|
|
if(newX > oldX){
|
|
@@ -200,9 +200,9 @@
|
|
}else{
|
|
}else{
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
- oldX = newX
|
|
|
|
|
|
+ oldX = newX
|
|
dragLeft = k1 + (e.clientX - strWrap.offset().left);
|
|
dragLeft = k1 + (e.clientX - strWrap.offset().left);
|
|
-
|
|
|
|
|
|
+
|
|
if (!p.circular) {
|
|
if (!p.circular) {
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
dragLeft = strWrap.width();
|
|
dragLeft = strWrap.width();
|
|
@@ -225,26 +225,26 @@
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
left: dragLeft
|
|
left: dragLeft
|
|
});
|
|
});
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
-
|
|
|
|
|
|
+
|
|
});
|
|
});
|
|
return false;
|
|
return false;
|
|
})
|
|
})
|
|
@@ -306,20 +306,20 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragLeft;
|
|
var dragLeft;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newX;
|
|
var newX;
|
|
var oldX = e.clientX;
|
|
var oldX = e.clientX;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
fMove = true;
|
|
fMove = true;
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
newX = e.clientX;
|
|
newX = e.clientX;
|
|
if(newX > oldX){
|
|
if(newX > oldX){
|
|
@@ -327,9 +327,9 @@
|
|
}else{
|
|
}else{
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
- oldX = newX
|
|
|
|
|
|
+ oldX = newX
|
|
dragLeft = k1 + (e.clientX - strWrap.offset().left);
|
|
dragLeft = k1 + (e.clientX - strWrap.offset().left);
|
|
-
|
|
|
|
|
|
+
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
dragLeft = strWrap.width();
|
|
dragLeft = strWrap.width();
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
@@ -340,20 +340,20 @@
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k1 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
left: dragLeft
|
|
left: dragLeft
|
|
});
|
|
});
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -380,7 +380,7 @@
|
|
left: -strMove.width(),
|
|
left: -strMove.width(),
|
|
right: 'auto'
|
|
right: 'auto'
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
if (strMove.width() > strWrap.width()) {
|
|
if (strMove.width() > strWrap.width()) {
|
|
var leftPos = strWrap.width();
|
|
var leftPos = strWrap.width();
|
|
strMove.css({
|
|
strMove.css({
|
|
@@ -393,7 +393,7 @@
|
|
leftPos = strMove.width();
|
|
leftPos = strMove.width();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
var
|
|
var
|
|
k2 = 0;
|
|
k2 = 0;
|
|
timeFunc = function () {
|
|
timeFunc = function () {
|
|
@@ -427,7 +427,7 @@
|
|
strWrap.data({
|
|
strWrap.data({
|
|
moveF : moveFunc
|
|
moveF : moveFunc
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
if(!p.inverthover){
|
|
if(!p.inverthover){
|
|
moveFunc();
|
|
moveFunc();
|
|
}
|
|
}
|
|
@@ -442,26 +442,26 @@
|
|
});
|
|
});
|
|
|
|
|
|
if (p.drag) {
|
|
if (p.drag) {
|
|
-
|
|
|
|
|
|
+
|
|
strWrap.on('mousedown', function (e) {
|
|
strWrap.on('mousedown', function (e) {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragLeft;
|
|
var dragLeft;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newX;
|
|
var newX;
|
|
var oldX = e.clientX;
|
|
var oldX = e.clientX;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
-
|
|
|
|
|
|
+
|
|
fMove = true;
|
|
fMove = true;
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
newX = e.clientX;
|
|
newX = e.clientX;
|
|
if(newX > oldX){
|
|
if(newX > oldX){
|
|
@@ -469,7 +469,7 @@
|
|
}else{
|
|
}else{
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
- oldX = newX
|
|
|
|
|
|
+ oldX = newX
|
|
dragLeft = k2 + (e.clientX - strWrap.offset().left);
|
|
dragLeft = k2 + (e.clientX - strWrap.offset().left);
|
|
|
|
|
|
|
|
|
|
@@ -496,20 +496,20 @@
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
left: dragLeft
|
|
left: dragLeft
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -525,9 +525,9 @@
|
|
};
|
|
};
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
|
|
+
|
|
if (p.runshort) {
|
|
if (p.runshort) {
|
|
-
|
|
|
|
|
|
+
|
|
var k2 = 0;
|
|
var k2 = 0;
|
|
var timeFunc = function () {
|
|
var timeFunc = function () {
|
|
time = (strWrap.width() - strMove.position().left) / strWrap.data('scrollamount') * 1000;
|
|
time = (strWrap.width() - strMove.position().left) / strWrap.data('scrollamount') * 1000;
|
|
@@ -572,21 +572,21 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragLeft;
|
|
var dragLeft;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newX;
|
|
var newX;
|
|
var oldX = e.clientX;
|
|
var oldX = e.clientX;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
k2 = strMoveLeft - (e.clientX - strWrap.offset().left);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
fMove = true;
|
|
fMove = true;
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
newX = e.clientX;
|
|
newX = e.clientX;
|
|
if(newX > oldX){
|
|
if(newX > oldX){
|
|
@@ -594,9 +594,9 @@
|
|
}else{
|
|
}else{
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
- oldX = newX
|
|
|
|
|
|
+ oldX = newX
|
|
dragLeft = k2 + (e.clientX - strWrap.offset().left);
|
|
dragLeft = k2 + (e.clientX - strWrap.offset().left);
|
|
-
|
|
|
|
|
|
+
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
if(dragLeft < -strMove.width() && dir < 0){
|
|
dragLeft = strWrap.width();
|
|
dragLeft = strWrap.width();
|
|
strMoveLeft = strMove.position().left;
|
|
strMoveLeft = strMove.position().left;
|
|
@@ -611,13 +611,13 @@
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
left:dragLeft
|
|
left:dragLeft
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -639,18 +639,18 @@
|
|
};
|
|
};
|
|
if (p.direction == 'up') {
|
|
if (p.direction == 'up') {
|
|
strWrap.addClass('str_vertical');
|
|
strWrap.addClass('str_vertical');
|
|
-
|
|
|
|
|
|
+
|
|
if (strMove.height() > strWrap.height()) {
|
|
if (strMove.height() > strWrap.height()) {
|
|
var topPos = -strMove.height();
|
|
var topPos = -strMove.height();
|
|
if (p.circular) {
|
|
if (p.circular) {
|
|
if (!p.xml) {
|
|
if (!p.xml) {
|
|
- circCloneVert();
|
|
|
|
|
|
+ circCloneVert();
|
|
topPos = -(strMove.height() + (strMove.height() - strWrap.height()));
|
|
topPos = -(strMove.height() + (strMove.height() - strWrap.height()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (p.xml) {
|
|
if (p.xml) {
|
|
strMove.css({
|
|
strMove.css({
|
|
- top:strWrap.height()
|
|
|
|
|
|
+ top:strWrap.height()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
var
|
|
var
|
|
@@ -663,7 +663,7 @@
|
|
fullS = (fullS + strWrap.height());
|
|
fullS = (fullS + strWrap.height());
|
|
time = (fullS - (strWrap.height() - parseFloat(strMove.css('top')))) / strWrap.data('scrollamount') * 1000;
|
|
time = (fullS - (strWrap.height() - parseFloat(strMove.css('top')))) / strWrap.data('scrollamount') * 1000;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
return time;
|
|
return time;
|
|
};
|
|
};
|
|
var moveFunc = function () {
|
|
var moveFunc = function () {
|
|
@@ -683,11 +683,11 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
strWrap.data({
|
|
strWrap.data({
|
|
moveF : moveFunc
|
|
moveF : moveFunc
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
if(!p.inverthover){
|
|
if(!p.inverthover){
|
|
moveFunc();
|
|
moveFunc();
|
|
}
|
|
}
|
|
@@ -706,19 +706,19 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragTop;
|
|
var dragTop;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newY;
|
|
var newY;
|
|
var oldY = e.clientY;
|
|
var oldY = e.clientY;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
-
|
|
|
|
|
|
+
|
|
fMove = true;
|
|
fMove = true;
|
|
|
|
|
|
//drag
|
|
//drag
|
|
@@ -730,7 +730,7 @@
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- oldY = newY
|
|
|
|
|
|
+ oldY = newY
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
|
|
|
|
|
|
|
|
@@ -744,7 +744,7 @@
|
|
dragTop = -strMove.height();
|
|
dragTop = -strMove.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
- }
|
|
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
dragTop = 0;
|
|
dragTop = 0;
|
|
@@ -763,24 +763,24 @@
|
|
top: dragTop
|
|
top: dragTop
|
|
});
|
|
});
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -802,9 +802,9 @@
|
|
});
|
|
});
|
|
var k2 = 0;
|
|
var k2 = 0;
|
|
var timeFunc = function () {
|
|
var timeFunc = function () {
|
|
-
|
|
|
|
|
|
+
|
|
time = (strMove.height() + strMove.position().top) / strWrap.data('scrollamount') * 1000;
|
|
time = (strMove.height() + strMove.position().top) / strWrap.data('scrollamount') * 1000;
|
|
-
|
|
|
|
|
|
+
|
|
return time;
|
|
return time;
|
|
};
|
|
};
|
|
var moveFunc = function () {
|
|
var moveFunc = function () {
|
|
@@ -844,19 +844,19 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragTop;
|
|
var dragTop;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newY;
|
|
var newY;
|
|
var oldY = e.clientY;
|
|
var oldY = e.clientY;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
fMove = true;
|
|
fMove = true;
|
|
|
|
|
|
//drag
|
|
//drag
|
|
@@ -868,9 +868,9 @@
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- oldY = newY
|
|
|
|
|
|
+ oldY = newY
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
-
|
|
|
|
|
|
+
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
dragTop = strWrap.height();
|
|
dragTop = strWrap.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
@@ -880,20 +880,20 @@
|
|
dragTop = -strMove.height();
|
|
dragTop = -strMove.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
- }
|
|
|
|
|
|
+ }
|
|
//*drag
|
|
//*drag
|
|
-
|
|
|
|
|
|
+
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
top: dragTop
|
|
top: dragTop
|
|
});
|
|
});
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -924,7 +924,7 @@
|
|
var topPos = strWrap.height();
|
|
var topPos = strWrap.height();
|
|
if (p.circular) {
|
|
if (p.circular) {
|
|
if (!p.xml) {
|
|
if (!p.xml) {
|
|
- circCloneVert();
|
|
|
|
|
|
+ circCloneVert();
|
|
topPos = strMove.height();
|
|
topPos = strMove.height();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -986,21 +986,21 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragTop;
|
|
var dragTop;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newY;
|
|
var newY;
|
|
var oldY = e.clientY;
|
|
var oldY = e.clientY;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
-
|
|
|
|
|
|
+
|
|
fMove = true;
|
|
fMove = true;
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
newY = e.clientY;
|
|
newY = e.clientY;
|
|
if(newY > oldY){
|
|
if(newY > oldY){
|
|
@@ -1010,7 +1010,7 @@
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- oldY = newY
|
|
|
|
|
|
+ oldY = newY
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
|
|
|
|
|
|
|
|
@@ -1024,7 +1024,7 @@
|
|
dragTop = -strMove.height();
|
|
dragTop = -strMove.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
- }
|
|
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
dragTop = 0;
|
|
dragTop = 0;
|
|
@@ -1051,7 +1051,7 @@
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
});
|
|
});
|
|
@@ -1110,14 +1110,14 @@
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.stop(true);
|
|
strMove.stop(true);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
//drag
|
|
//drag
|
|
var dragTop;
|
|
var dragTop;
|
|
var dir = 1;
|
|
var dir = 1;
|
|
var newY;
|
|
var newY;
|
|
var oldY = e.clientY;
|
|
var oldY = e.clientY;
|
|
//drag
|
|
//drag
|
|
-
|
|
|
|
|
|
+
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
$(this).on('mousemove', function (e) {
|
|
$(this).on('mousemove', function (e) {
|
|
@@ -1132,10 +1132,10 @@
|
|
dir = -1
|
|
dir = -1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- oldY = newY
|
|
|
|
|
|
+ oldY = newY
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
dragTop = k2 + e.clientY - strWrap.offset().top;
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
if(dragTop < -strMove.height() && dir < 0){
|
|
dragTop = strWrap.height();
|
|
dragTop = strWrap.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
@@ -1145,26 +1145,26 @@
|
|
dragTop = -strMove.height();
|
|
dragTop = -strMove.height();
|
|
strMoveTop = strMove.position().top;
|
|
strMoveTop = strMove.position().top;
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
k2 = strMoveTop - (e.clientY - strWrap.offset().top);
|
|
- }
|
|
|
|
|
|
+ }
|
|
//*drag
|
|
//*drag
|
|
-
|
|
|
|
|
|
+
|
|
strMove.stop(true).css({
|
|
strMove.stop(true).css({
|
|
top: dragTop
|
|
top: dragTop
|
|
});
|
|
});
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}).on('mouseup', function () {
|
|
}).on('mouseup', function () {
|
|
if(p.inverthover){
|
|
if(p.inverthover){
|
|
strMove.trigger('mouseenter')
|
|
strMove.trigger('mouseenter')
|
|
}
|
|
}
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- setTimeout(function () {
|
|
|
|
|
|
+ setTimeout(function () {
|
|
fMove = false
|
|
fMove = false
|
|
}, 50)
|
|
}, 50)
|
|
})
|
|
})
|
|
@@ -1184,10 +1184,10 @@
|
|
}
|
|
}
|
|
};
|
|
};
|
|
};
|
|
};
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
if (p.xml) {
|
|
if (p.xml) {
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -1200,20 +1200,20 @@
|
|
var xmlElActive = xmlTextEl.eq(i);
|
|
var xmlElActive = xmlTextEl.eq(i);
|
|
var xmlElContent = xmlElActive.text();
|
|
var xmlElContent = xmlElActive.text();
|
|
var xmlItemEl = $('<span>').text(xmlElContent).appendTo(strWrap);
|
|
var xmlItemEl = $('<span>').text(xmlElContent).appendTo(strWrap);
|
|
-
|
|
|
|
|
|
+
|
|
if(p.direction == 'left' || p.direction == 'right'){
|
|
if(p.direction == 'left' || p.direction == 'right'){
|
|
- xmlItemEl.css({display:'inline-block',textAlign:'right'});
|
|
|
|
|
|
+ xmlItemEl.css({display:'inline-block',textAlign:'right'});
|
|
if(i > 0){
|
|
if(i > 0){
|
|
- xmlItemEl.css({width:strWrap.width()+xmlItemEl.width()});
|
|
|
|
|
|
+ xmlItemEl.css({width:strWrap.width()+xmlItemEl.width()});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(p.direction == 'down' || p.direction == 'up'){
|
|
if(p.direction == 'down' || p.direction == 'up'){
|
|
- xmlItemEl.css({display:'block',textAlign:'left'});
|
|
|
|
|
|
+ xmlItemEl.css({display:'block',textAlign:'left'});
|
|
if(i > 0){
|
|
if(i > 0){
|
|
xmlItemEl.css({paddingTop:strWrap.height()});
|
|
xmlItemEl.css({paddingTop:strWrap.height()});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
code();
|
|
code();
|
|
}
|
|
}
|
|
@@ -1223,12 +1223,12 @@
|
|
}
|
|
}
|
|
strWrap.data({
|
|
strWrap.data({
|
|
ini:code,
|
|
ini:code,
|
|
- startheight: startHeight
|
|
|
|
|
|
+ startheight: startHeight
|
|
})
|
|
})
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
});
|
|
});
|
|
},
|
|
},
|
|
update: function () {
|
|
update: function () {
|
|
@@ -1240,11 +1240,11 @@
|
|
el.data('ini')();
|
|
el.data('ini')();
|
|
},
|
|
},
|
|
destroy: function () {
|
|
destroy: function () {
|
|
-
|
|
|
|
|
|
+
|
|
var el = $(this);
|
|
var el = $(this);
|
|
var elMove = $('.str_move',el);
|
|
var elMove = $('.str_move',el);
|
|
var startHeight = el.data('startheight');
|
|
var startHeight = el.data('startheight');
|
|
-
|
|
|
|
|
|
+
|
|
$('.str_move_clone',el).remove();
|
|
$('.str_move_clone',el).remove();
|
|
el.off('mouseenter');
|
|
el.off('mouseenter');
|
|
el.off('mousedown');
|
|
el.off('mousedown');
|
|
@@ -1252,28 +1252,28 @@
|
|
el.off('mouseleave');
|
|
el.off('mouseleave');
|
|
el.off('mousemove');
|
|
el.off('mousemove');
|
|
el.removeClass('noStop').removeClass('str_vertical').removeClass('str_active').removeClass('no_drag').removeClass('str_static').removeClass('str_right').removeClass('str_down');
|
|
el.removeClass('noStop').removeClass('str_vertical').removeClass('str_active').removeClass('no_drag').removeClass('str_static').removeClass('str_right').removeClass('str_down');
|
|
-
|
|
|
|
- var elStyle = el.attr('style');
|
|
|
|
|
|
+
|
|
|
|
+ var elStyle = el.attr('style');
|
|
if(elStyle){
|
|
if(elStyle){
|
|
var styleArr = elStyle.split(';');
|
|
var styleArr = elStyle.split(';');
|
|
for(var i=0; i < styleArr.length; i++){
|
|
for(var i=0; i < styleArr.length; i++){
|
|
var str = $.trim(styleArr[i]);
|
|
var str = $.trim(styleArr[i]);
|
|
var tested = str.search(/^height/g);
|
|
var tested = str.search(/^height/g);
|
|
if(tested != -1){
|
|
if(tested != -1){
|
|
- styleArr[i] = '';
|
|
|
|
|
|
+ styleArr[i] = '';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
var newArr = styleArr.join(';');
|
|
var newArr = styleArr.join(';');
|
|
var newStyle = newArr.replace(/;+/g,';')
|
|
var newStyle = newArr.replace(/;+/g,';')
|
|
-
|
|
|
|
|
|
+
|
|
if(newStyle == ';'){
|
|
if(newStyle == ';'){
|
|
- el.removeAttr('style');
|
|
|
|
|
|
+ el.removeAttr('style');
|
|
}else{
|
|
}else{
|
|
- el.attr('style',newStyle);
|
|
|
|
|
|
+ el.attr('style',newStyle);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
if(startHeight){
|
|
if(startHeight){
|
|
- el.css({height:startHeight})
|
|
|
|
|
|
+ el.css({height:startHeight})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
elMove.stop(true);
|
|
elMove.stop(true);
|
|
@@ -1283,19 +1283,19 @@
|
|
elMove.remove();
|
|
elMove.remove();
|
|
el.html(context);
|
|
el.html(context);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
- pause: function(){
|
|
|
|
|
|
+ pause: function(){
|
|
var el = $(this);
|
|
var el = $(this);
|
|
var elMove = $('.str_move',el);
|
|
var elMove = $('.str_move',el);
|
|
elMove.stop(true);
|
|
elMove.stop(true);
|
|
- },
|
|
|
|
|
|
+ },
|
|
play: function(){
|
|
play: function(){
|
|
var el = $(this);
|
|
var el = $(this);
|
|
$(this).off('mousemove');
|
|
$(this).off('mousemove');
|
|
- el.data('moveF')();
|
|
|
|
|
|
+ el.data('moveF')();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
};
|
|
};
|
|
$.fn.liMarquee = function (method) {
|
|
$.fn.liMarquee = function (method) {
|
|
if (methods[method]) {
|
|
if (methods[method]) {
|
|
@@ -1306,4 +1306,4 @@
|
|
$.error('Метод ' + method + ' в jQuery.liMarquee не существует');
|
|
$.error('Метод ' + method + ' в jQuery.liMarquee не существует');
|
|
}
|
|
}
|
|
};
|
|
};
|
|
-})(jQuery);
|
|
|
|
|
|
+})(jQuery);
|