Chris Weiss
Chris Weiss

Reputation: 73

add font overlay to simple javascript typewriter

new to coding in general, so I'm kind of at a loss. I have a simple typewriter effect jquery script AND another simple javascript/ CSS trick to overlay one font on top of another. I am trying to combine the functionality of the two. I have found two ways to overlay the fonts with javascript/css, but the issue I have is this. When the page loads, the typing script starts and at the same time the script for the font overlay runs, and since the typing script is just getting started, the font overlay does not apply to the typed text. The ticker code i am using is at https://github.com/stephband/jticker and the javascript/css is from here http://jsfiddle.net/4xgdv/1/ with th js part looking like this

$('.doublefont').each(function() {
 $(this).attr('content', $(this).html());

and using the css class "doublefont" and the :after selector to copy and overlay the text.

Not looking for someone to code it for me, just a place to start in where things should go during the recursion and an idea how the overlay would fit in would be nice.

This is really beyond me, but I thought of something I wanted to see and it wont leave me alone, so any help would be appreciated!

Upvotes: 1

Views: 113

Answers (1)

Hamed Khosravi
Hamed Khosravi

Reputation: 545

I wrote the script for overlay text in this site and it's full open source. try it:http://www.drabc.ir/

Upvotes: 1

Related Questions