I have three images named img1
, img2
, and img3
. Initially, their position is set to -50% absolute top right and left. When I change the position to static
with a transition of 2s
, they should move to the center.
Issue: During the transition, there is snapping occurring in some instances on Chrome (specifically on certain laptops). I am aware that something is causing the transition to break.
Below is my jQuery code snippet:
$(".middle-fixed-coming-soon-top").css({"top": "0px"});
$(".middle-fixed-coming-soon-top").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
$(".middle-fixed-coming-soon-top").css({"position": "static"});
// code to execute after transition ends
});
$(".middle-fixed-organics-left").css({"left": "333px"});
$(".middle-fixed-organics-left").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
$(".middle-fixed-organics-left").css({"position": "static"});
$(".middle-fixed-organics-left .for-margin").css("margin-top", "auto");
// code to execute after transition ends
});
$(".middle-fixed-tagline-right").css({"right": "333px"});
$(".middle-fixed-tagline-right").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
$(".middle-fixed-tagline-right").css({"position": "static"});
$(".middle-fixed-tagline-right .for-margin").css("margin-top", "auto");
// code to execute after transition ends
});
I'm new to jQuery. Can anyone provide assistance? Thank you in advance.
EDITS
This issue occurs when I reload for the second time or more.