Comments (2)
Hi, Geoff --
Sorry for the troubles you're having with this. The callback only executes if the loop option is set to false, since it was only designed to execute after all of the strings have been finally typed. I may consider releasing a patch to have that execute after each set of strings, though.
Additionally, when re-looping over the strings, TypeIt won't look at the strings option again; it will just re-use what's already been cached. So, to get your effect going, I'd construct the strings before passing them into TypeIt, like this:
var words = ["developer", "designer", "problem solver", "hard worker", "nice guy!"];
var sentences = [];
for(var i = 0; i < words.length; i++) {
sentences.push('I’m Geoff and I’m a ' + words[i]);
}
$("#about h3").typeIt({
strings: sentences,
startDelay: 1500,
speed: 100,
loop: true,
autoStart: false
});
This will type out all of those strings, and because loop is set to true, delete the entire set (unless breakLines = false) and retype them.
I hope this helps! Let me know if you have more questions.
Alex
from typeit.
Hi Alex
Thanks for the response.
Yeah that should do the trick, I'll keep an eye out for your patch if you do one though.
Geoff
from typeit.
Related Issues (20)
- Angular - Cannot find type definition file for 'web-animations-js'. HOT 2
- Solution: Emojis have a extra character and then disappear #208
- Module parse failed HOT 1
- Warning showing as console Error on latest Next/React. HOT 2
- Delay between strings is inconsistent/gets longer
- Cursor style problem: can not override ```--ti-cursor-font-size``` css variable
- Delete between strings with React HOT 2
- Problem with duplicate set of first element of array of strings
- React Error.
- Using `getBeforeInit` throws React TypeError: getBeforeInit is not a function. HOT 1
- .destroy() method in shortcode
- Force queue to finish all at once? HOT 1
- Doesn't type on mobile HOT 2
- Document is not defined - Angular 17 HOT 5
- Type Doesn't Match Docs
- Fadein effect
- `Element` prop not working on typeit-react HOT 1
- Add more examples
- Spaces causing temporary line break
- Any way to dry up chained methods?
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 typeit.