Comments (11)
Hey @smfoster3, by speed are you referring to the delay between each phrase?
from morphext.
Yes. Right now I have these settings:
$("#js-rotating").Morphext({ animation: "fadeIn", speed: 300,
What I would like to do is have the 'speed:' setting changed to, say, 600, for certain phrases. Let's say I have 20 phrases. I want the first 16 to rotate at 300, then the last 4 to rotate at 600. I attempted to do this with a similar settings to #12 in 'complete' but was unsuccessful.
from morphext.
Ah I see, yea I was going to recommend using complete
. Can I have a look at your code / attempt?
from morphext.
Sure. I had tried something like this along with some other iterations to no avail:
`$("#js-rotating").Morphext({
animation: "rotateIn",
speed: 1000,
complete: function () {
if (this.index === 3) {
this.settings.speed = 2000;
}
}
});
`
Also important, I noticed that the settings do not reset after the phrases finish. So when I'm successful at altering animation, it will stay on that animation on the next run through the phrases.
Ultimately what I'm looking to do is have the phrases speed be quick for x number of phrases, and slower for y number of phrases, then reset when the animation runs through again.
Let me know if I'm not being clear. I greatly appreciate your help!
from morphext.
I believe you are on the right track.
Have you tried something like this:
$("#js-rotating").Morphext({
animation: "rotateIn",
speed: 500,
complete: function () {
if (this.index > (this.phrases.length - 5)) {
this.settings.speed = 2000;
} else {
this.settings.speed = 500;
}
}
});
Assuming you have 20 phrases (going back to your original post), we will use a speed of 2000 for anything after 15, and 500 for everything else.
Let me know if that helps.
from morphext.
No that isn't working unfortunately. I believe I tried that at one point as well without success. Interestingly the this.settings.animation works just fine, as you can see in this demo.
To get that I have:
$("#js-rotating").Morphext({ animation: "fadeIn", speed: 500, complete: function () { if (this.index > (this.phrases.length - 4)) { this.settings.speed = 2000; this.settings.animation = "rotateIn"; } else { this.settings.speed = 500; this.settings.animation = "fadeIn" } } });
Still no change in speed though. I've been trying many things over the last few days and just can't seem to get it.
from morphext.
Did any of you get this working? I have the same problem.
from morphext.
I have not found a working solution yet no.
from morphext.
Good night, im stuck on an animation, the thing is , i have three lines paragraph, and they transalte in the animation from english to spanish, and the client wants, the english paragraph stays in english 15 seconds, and 4 seconds in spanish, and keep doing it in a loop, i only had achieved to change three times but then the animation stops. Can anyone help me? thanks
from morphext.
Apologies for the delay, I'll get back to this ASAP.
from morphext.
Changing the settings.speed doesn't seem to work on complete... any ideas?
from morphext.
Related Issues (20)
- devDependencies out of date HOT 4
- How to remove an animation after it has completed? HOT 5
- The latest version tag problem HOT 6
- Fade Out Animation HOT 2
- Add fadeInfadeOut stuff HOT 4
- Conflict with the animate.css latest version! HOT 4
- Changing speed of animation depending on index
- linebreak HOT 4
- Stop after completed HOT 6
- Have not Animation feature Clip, Type, Loading Bar HOT 1
- Morphext is not a function HOT 2
- There is miss git tags v2.4.5~v2.4.7 on GitHub repository
- more compress and seccure this plugin HOT 4
- Skip to next Word HOT 1
- [Feature Request] Please add character based animation HOT 2
- Typo in the instructions on morphext.fyianlai.com HOT 2
- Prevent all phrases from flashing inside rotating element on page load HOT 4
- Reset to first word upon click of a button HOT 4
- How to override options?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from morphext.