Loading unlooped gif-animation several times

Loading unlooped gif-animation several times

Content Index :

Loading unlooped gif-animation several times
Tag : javascript , By : Rob
Date : November 24 2020, 03:01 PM

should help you out The problem is that the browser caches the image after it has been loaded once, and the animation is run only when the image is fresh, not when the browser pulls it from its cache.
You can force the browser to reload the image by adding an arbitrary parameter to the URL that changes every time the image is referenced, like a time stamp, for example.
function f(obj) {
    obj.innerHTML = '<img src="images/ok.gif?timestamp=' + Date.now() + '">';

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Should I animate a three dots loading animation using Core Animation or should I find a way to show a gif of the same op

Tag : iphone , By : Erwin
Date : March 29 2020, 07:55 AM
it fixes the issue For a simple animation you can use a UIImageView animation to animate a set of images (i.e. use the images as frames in the animation).
UIImageView* dotsImageView= [[UIImageView alloc] initWithFrame:dotsFrame];

// load all the frames of your animation
dotsImageView.animationImages = @[[UIImage imageNamed:@"image1.png"],
                                  [UIImage imageNamed:@"image2.png"],
                                  [UIImage imageNamed:@"image3.png"]];

// set how long it will take to go through all images 
dotsImageView.animationDuration = 1.0;
// repeat the animation forever
dotsImageView.animationRepeatCount = 0;
// start the animation
[dotsImageView startAnimating];
// add it to the view
[self.view addSubview:dotsImageView];

Instant return to initial state after Angular2 Animate based animation to be able to run the animation several times

Tag : development , By : user119605
Date : March 29 2020, 07:55 AM
I wish did fix the issue. ,
class AnimateBox {
    //animation: Animation;

    constructor(private _ab: AnimationBuilder, private _e: ElementRef) {}

  createAnimation:Function = (forward:boolean, count:number):Animation => {
    animation = this._ab.css();
      if(forward) {
            top: '-20px', 
            opacity: '100',  
            top: '-120px'
            opacity: '0',  
      } else {
            top: '-120px', 
            opacity: '0',  
            opacity: '100',  
            top: '-20px'

      a = animation.start(this._e.nativeElement);
      a.onComplete(() => { this.onComplete(forward, count);});

    onComplete:Function = (forward:boolean, count:number) => {
        console.log("animation finished");
        //animation.applyStyles({top: '-20px', opacity: '100' });
        if(count) {
          a = this.createAnimation(!forward, --count);
          console.log('a ' + a);

    toggle:Function =(isVisible: boolean = false) => {
cb: Function = () => {
    console.log("animation finished");
    // this.a.applyStyles({top: '-20px', opacity: '100' });

Code animation - Convert a loading circle gif with check mark to animation based on JS

Tag : jquery , By : kgw
Date : March 29 2020, 07:55 AM
Hope this helps Yes, it is possible. You can make a large one, record its animation and then convert the HQ one to gif format.
Here is one of the solution:
$.getScript('https://rawgit.com/kimmobrunfeldt/progressbar.js/1.0.0/dist/progressbar.js', function(){

var loading = `<style>
div#container {
  margin: 20px;
  width: 200px;
  height: 200px;
  pointer-events: none;
  user-select: none;
div#bkground {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 200px;
  height: 200px;
div#bkground div {
  width: 182px;
  height: 182px;
  background-color: #a3a3ff;
  border-radius: 100px;
div#whitecircle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 200px;
  height: 200px;
div#whitecircle div {
  width: 182px;
  height: 182px;
  background-color: #fff;
  border-radius: 100px;
div#tick {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 200px;
  height: 200px;
div#tick div {
  color: #E0E0FF;
  font-size: 0;
  font-weight: bold;
<div id="container">
<div id='bkground'><div></div></div>
<div id='whitecircle'><div></div></div>
<div id='tick'><div>✔</div></div>
var bar = new ProgressBar.Circle(container, {
  strokeWidth: 5,
  easing: 'easeInOutExpo',
  duration: 1500,
  color: '#a3a3ff',
  trailColor: '#d1d1ff',
  trailWidth: 5,
  svgStyle: null,  
  from: { color: '#a3a3ff', width: 5 },
  to: { color: '#a3a3ff', width: 5 },
  step: function(state, circle) {
    circle.path.setAttribute('stroke', state.color);
    circle.path.setAttribute('stroke-width', state.width);
    var value = Math.round(circle.value() * 100);
    if (value === 0) {
    } else {
bar.text.style.color = 'transparent';
var interval2 = setInterval(function(){
  if ($('div.progressbar-text').text() == '100') {
    $('div#whitecircle div').animate({
      width: 0,
      height: 0
    }, 333, function(){
      $('div#tick div').animate({
        fontSize: 150
      }, 333);
}, 100);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js"></script>
<div class='check' id='check'></div>

Show and Hide WPF window with slide animation multiple times while showing animation consistently each time

Tag : chash , By : rixtertech
Date : March 29 2020, 07:55 AM
Hope that helps Change the MouseUp EventTrigger to:
Reset to the beginning of the animation, using SeekStoryboard Stop the animation, using PauseStoryboard. Using StopStoryboard run the animation to the fill state, which is not what you want: you want the window to disappear.
        <EventTrigger RoutedEvent="FrameworkElement.MouseUp">
            <SeekStoryboard BeginStoryboardName="BeginToastAnimationStoryboard" />
            <PauseStoryboard BeginStoryboardName="BeginToastAnimationStoryboard" />

How to replace SwipeRefreshLayout loading animation with a Lottie animation

Tag : android , By : Kaveh
Date : March 29 2020, 07:55 AM
seems to work fine "LottieSwipeRefreshLayout" worked out for me. the main catch is to use attribute app:layout_type="content" in your recyclerview,scroll view, nested scroll view etc.
Also to customize the Lottie animation modification can be done in listeners onTriggerListener and onProgressListener which are overridden in LottiePullToRefreshLayout class
Related Posts Related QUESTIONS :
  • Launch local executable from web browser
  • How to prepare array of json objects to d3 hierarchical tree structure
  • VueJS - event emitted - show HTML before other calculations
  • Export SASS/SCSS variables to Javascript without exporting them to CSS
  • How to attach an event handler only once continuously
  • How to make button open a link in new tab in JavaScript?
  • Find range from the javascript object
  • How can I use my jQuery code as JavaScript?
  • How to show 5 images in a 2 row slider with bxslider
  • How to convert stream into variables in typescript
  • Three.js custom shader error on Chrome GL_INVALID_OPERATION: Active draw buffers with missing fragment shader outputs
  • My JavaScript doesn't work. How can I solve this problem?
  • Why is this async function is running synchronously?
  • Get updated variable from within react hook before return
  • I want to show all image preview but whenever I upload a new one the old one is gone
  • Would I be able to give access to specific electron APIs safely?
  • Why several clicks fire for each instance of a Class?
  • cant grab value from div using attr()
  • Make web service not accessible by browser?
  • Select DOM elements within template
  • How to customize angular ui-grid row background color?
  • Binding data in two respective $scope in AngularJS, how?
  • react put some props after import class
  • Variable is distributed among same components
  • switch class in jQuery/JavaScript for active/inactive state
  • How To Track Outbound Clicks Using Javascript
  • How to get total seconds elapsed since the beginning of the month?
  • Protractor: Stale element reference at "browser.wait(EC.visibilityOf(confDial), FIFTY_SECONDS);"
  • Access to an array inside an object
  • Reseting an JavaScript Interval with different value?
  • Learning Angular for the first time - version 2 or 4?
  • Rendering RSS feed (XML) in React with jquery, why do object values parsed from the feed seem empty?
  • Node.js xml2js http.request tag matching
  • applying texture to custom plane geometry in Threejs
  • How do I pass an Event as a function parameter in HTML written inside JavaScript variable?
  • Interface of object parameter with default value and default property
  • Does using try / catch rather than `.catch` observable operator with XHR requests reduce performance?
  • In IE11 background colors not working on printing
  • TypeScript interface signature "(): string"
  • Is synchronous XMLHttpRequest supported in Internet Explorer 10 and 11?
  • Axios function not returning any values with js
  • How to use firestore TIMESTAMP to create time-stamp in JavaScript
  • Instantiate subclass without constructing
  • Outputing a created object in javascript to a server side JSON file
  • Transition the numeric labels in a bar chart
  • createBottomTabNavigator: hide just one tab from the tabBar
  • iife vs simple statement behavior with document.title
  • showDialogPopup Refresh Page after Click
  • Child component does not set the initial value passed from the parent: ReactJS
  • Nodejs javascript added to button not responding
  • Trying to define a promise.all
  • Python GEE to extract featurecollection timeseries from Landsat imageries
  • How to write negative binary number?
  • Unable to set property of individual object
  • Why Named Function Expression itself cannot assign Name to another Value?
  • How to reset scroll position on single page pagination
  • How to scroll to bottom of page, when a new message is sent - Socket.io
  • How to reconstruct audio blob from a base64 encoded String?
  • How to calculate numbers within an array of objects
  • Using JavaScript to change CSS properties of SVG circles for all circles that was not clicked
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com