Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
bennetonss
jQuery add and remove Class breaks on Chrome
in
Using jQuery
•
7 years ago
Hi,
I have this custom slide in animation based on css transitions with add and remove Class.
Example at:
http://codepen.io/TheEnd/full/pgGJWX/
The code goes like this,
///* animate code start here currentSlideX_Wrapper manipulation - .slide *///
var currentSlideX_Wrapper = $this.parents(".slideX"),
nextSlideX_Wrapper = currentSlideX_Wrapper.next(".slideX");
//animateInNextSlide
currentSlideX_Wrapper.removeClass("active");
currentSlideX_Wrapper.one("transitionend webkitTransitionEnd oTransitionEnd", function() {
var $this = $(this);
$this.addClass("displayNoneX");
});
currentSlideX_Wrapper.promise().done(function() {
console.log("css transition ended!!!");
if (nextSlideX_Wrapper && nextSlideX_Wrapper.hasClass("displayNoneX")) {
nextSlideX_Wrapper.removeClass("displayNoneX");
}
nextSlideX_Wrapper.promise().done(function() {
setTimeout(function() {
nextSlideX_Wrapper.addClass("active");
}, 90);
});
});
///* animate code ends here *///
It runs fine on firefox but if you click the back button and play around, it breaks on chrome and the animation goes haywire. I am at a total loss.
Please help.
1
Replies(1)
kbwood.au
Re: jQuery add and remove Class breaks on Chrome
7 years ago
Because your animations are done in CSS there are no jQuery animations running, so your wrapper
promise
would run immediately.
Leave a comment on kbwood.au's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to bennetonss's question
Top
Reply
{"z28991422":[14737000006680150],"z2953500":[14737000006696005]}
Statistics
1
Replies
2910
Views
0
Followers
Tags
Cancel
addclass
removeclass
animation
jquery
Actions
Permalink