Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

marquee-lottery

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marquee-lottery - npm Package Compare versions

Comparing version 0.1.3 to 0.1.5

jquery-plugin.marquee-lottery.min.js

28

jquery-plugin.marquee-lottery.js

@@ -9,3 +9,3 @@ /**

var $this = $(this);
var roundTotal= 4,totalTime=1500,minTime=100,reduceStepTime=200,addTimeStep=50,desIndex= 0;
var roundTotal= 4,maxTime=1500,minTime=100,reduceStepTime=200,addTimeStep=50,desIndex= 0;

@@ -16,3 +16,3 @@ var defaultSettings = {

roundTotal:roundTotal,
totalTime:totalTime,
maxTime:maxTime,
minTime:minTime,

@@ -31,10 +31,10 @@ addTimeStep:addTimeStep,

return $this;
}else if(settings.minTime > settings.totalTime || settings.minTime == 0){
$.error('Marquee \'minTime\' error : more than \'totalTime\' or equal 0.');
}else if(settings.minTime > settings.maxTime || settings.minTime == 0){
$.error('Marquee \'minTime\' error : more than \'maxTime\' or equal 0.');
return $this;
}else if(settings.addTimeStep <= 0 || settings.addTimeStep > settings.totalTime){
$.error('Marquee \'addTimeStep\' error : less than 0 or equal 0 more than \`totalTime\`.');
}else if(settings.addTimeStep <= 0 || settings.addTimeStep > settings.maxTime){
$.error('Marquee \'addTimeStep\' error : less than 0 or equal 0 more than \`maxTime\`.');
return $this;
}else if(settings.reduceTimeStep <= 0 || settings.reduceTimeStep > settings.totalTime){
$.error('Marquee \'reduceTimeStep\' error : less than 0 or equal 0 or more than \`totalTime\`.');
}else if(settings.reduceTimeStep <= 0 || settings.reduceTimeStep > settings.maxTime){
$.error('Marquee \'reduceTimeStep\' error : less than 0 or equal 0 or more than \`maxTime\`.');
return $this;

@@ -57,3 +57,3 @@ }else if(settings.roundTotal <= 0){

minTime=settings.minTime,reduceStepTime=settings.reduceTimeStep,addTimeStep=settings.addTimeStep,
totalTime=settings.totalTime,currentTime=totalTime;
maxTime=settings.maxTime,currentTime=maxTime;
//Fix the bug of the secondary of start, the `desIndex` is the active class.

@@ -67,5 +67,5 @@ $(sArr[desIndex]).removeClass(settings.activeClass);

}
$(sArr[currentIndex]).addClass(settings.activeClass);
$(sArr[currentIndex]).toggleClass(settings.activeClass);
var beforeIndex = currentIndex - 1 < 0 ? sArrCount - 1 : currentIndex - 1;
$(sArr[beforeIndex]).removeClass(settings.activeClass);
$(sArr[beforeIndex]).toggleClass(settings.activeClass);
currentIndex++;

@@ -81,4 +81,4 @@

settings.finishCallback();
$this.trigger('finish-marquee-animation');
}, delayTime);
return $this;
}

@@ -88,3 +88,3 @@ }

if (currentRound > roundTotal - 1) {
currentTime = currentTime + addTimeStep > totalTime ? totalTime : currentTime + addTimeStep;
currentTime = currentTime + addTimeStep > maxTime ? maxTime : currentTime + addTimeStep;
} else {

@@ -96,2 +96,4 @@ currentTime = currentTime - reduceStepTime < minTime ? minTime : currentTime - reduceStepTime;

setTimeout(callback, currentTime);
$this.trigger('start-marquee-animation');
return $this;
}

@@ -98,0 +100,0 @@ };

{
"name":"MarqueeLottery",
"version":"0.1.0",
"version":"0.1.5",
"title":"jQuery MarqueeLottery",

@@ -5,0 +5,0 @@ "keywords":[

{
"name": "marquee-lottery",
"version": "0.1.3",
"version": "0.1.5",
"description": "marquee-lottery is a jQuery Plugin.For conviently creating lottery activiry.",

@@ -5,0 +5,0 @@ "main": "jquery-plugin.marquee-lottery.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc