8000 Fails on relative animations · Issue #6 · tobia/Pause · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}
This repository was archived by the owner on Nov 15, 2019. It is now read-only.
This repository was archived by the owner on Nov 15, 2019. It is now read-only.
Fails on relative animations #6
Open
@zessx

Description

@zessx

Consider this example :

<div class="element" style="position:absolute;top:200px">Hello</div>
function toUp() {
  $('.element').animate({top: '+=50px'}, 800, 'swing', toDown);
}
function toDown() {
  $('.element').animate({top: '-=50px'}, 800, 'swing', toUp);
}
toUp();
$('.element').hover(function() {
  $(this).pause();
}, function() {
  $(this).resume();
});

The animation is paused/resumed, but we've got an additional offset each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0