10 examples of 'animate flash jquery' in JavaScript

Every line of 'animate flash jquery' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
250function hideFlash() {
251 $('.flash-message').slideUp('fast');
252}
163function flash(elements, numberOfTimes, delay, onComplete) {
164 flashOnce(0)
165
166 function flashOnce(initialShowDelay) {
167 setTimeout(function () {
168 show(elements)
169 setTimeout(function () {
170 hide(elements)
171 numberOfTimes--
172
173 if (numberOfTimes > 0) {
174 flashOnce(delay)
175 } else {
176 onComplete()
177 }
178 }, delay)
179 }, initialShowDelay)
180 }
181}
13function flashStatus(txt, fade) {
14 if(fade) {
15 $("#status").text(txt).show().fadeOut(1200);
16 } else {
17 $("#status").text(txt).show();
18 }
19}
72function fadeIn(element, callback) {
73 var currentOpacity = getStyle(element, 'opacity') || 1;
74 var display = getStyle(element, 'display');
75 if (display === 'none') {
76 element.style.display = 'block';
77 currentOpacity = 0;
78 }
79 var opacity = Number(currentOpacity) + fadingStep;
80 element.style.opacity = opacity > 1 ? 1 : opacity;
81 setTimeout(function () {
82 if (opacity < 1) {
83 fadeIn(element, callback);
84 } else {
85 typeof callback === 'function' && callback();
86 }
87 }, 10);
88}
342hide: function hideFlash(slideReference, div) {
343
344}
95_updateTime() {
96 this.trigger(Events.PLAYBACK_TIMEUPDATE, {current: this.el.getPosition(), total: this.el.getDuration()}, this.name)
97}
86export function fadeIn (el, duration = 400, callback) {
87 if (!el.style.opacity) {
88 el.style.opacity = 0;
89 }
90
91 let start = null;
92 window.requestAnimationFrame(function animate (timestamp) {
93 start = start || timestamp;
94 const progress = timestamp - start;
95 const opacity = parseFloat(progress / duration, 2);
96 el.style.opacity = opacity > 1 ? 1 : opacity;
97 if (progress > duration) {
98 if (callback && typeof(callback) === 'function') {
99 callback();
100 }
101 } else {
102 window.requestAnimationFrame(animate);
103 }
104 });
105}
661getFlashObject() {
662 return this.player.querySelector(ELEMENT_TYPES.OBJECT);
663}
9function flash(message, type) {
10 var messageBlock = $('<div></div>');
11 messageBlock.addClass('alert-' + type);
12 messageBlock.text(message);
13 $('#messageDiv').append(messageBlock);
14 messageBlock.fadeOut(5000, function() {
15 $(this).remove();
16 });
17}
121update(time, delta) {
122 if ((!this.isRunning) || (!this.enable)) {
123 return this;
124 }
125
126 if ((this.timeScale === 0) || (delta === 0)) {
127 return this;
128 }
129
130 this.nowTime += (delta * this.timeScale);
131 var visible = (this.nowTime &lt;= (this.duration / 2)) ? false : true;
132 this.gameObject.setVisible(visible);
133
134 if (this.nowTime &gt;= this.duration) {
135 if ((this.repeat === -1) || (this.repeatCounter &lt; this.repeat)) {
136 this.repeatCounter++;
137 this.nowTime -= this.duration;
138 } else {
139 this.complete();
140 }
141 }
142 return this;
143}

Related snippets