News for hackers. Stuff that matters.
Re:Show HN: Tply – a simple typewriter effect for your websites by jellekralt on Tuesday February 23, 2016 @01:58AM (#11157099)
Link to the actual repository with documentation: https://github.com/ichub/tply
Re:Show HN: Tply – a simple typewriter effect for your websites by nivertech on Tuesday February 23, 2016 @04:56AM (#11157764)
Is it possible to type the sentence, then delete the last words and retype different words? Also show the blinking caret/cursor when typing or deleting characters.

I.e. something like here: https://www.particle.io/

Re:Show HN: Tply – a simple typewriter effect for your websites by ichub on Tuesday February 23, 2016 @10:30AM (#11159525)
Yes, you can delete previously typed sentences, see example #3 on the site: use a <delete> element.

If you want a caret, there's two options: * put your tply source into a span, then after the span create and style your own caret. * contribute to the repo and add an easier way to have a caret (:

Re:Show HN: Tply – a simple typewriter effect for your websites by fiatjaf on Tuesday February 23, 2016 @11:48AM (#11160196)
This would make a nice Eager app, like https://eager.io/app/typist
Re:Show HN: Tply – a simple typewriter effect for your websites by ichub on Tuesday February 23, 2016 @12:53PM (#11160786)
Didn't know about Eager, thanks for letting me know about it!
Re:Show HN: Tply – a simple typewriter effect for your websites by fiatjaf on Tuesday February 23, 2016 @11:46AM (#11160176)
How do you do these special HTML elements?
Re:Show HN: Tply – a simple typewriter effect for your websites by ichub on Tuesday February 23, 2016 @12:52PM (#11160772)
If you're wondering about how you would go about using this in your own website, check out the documentation in the github repo here: https://github.com/ichub/tply

If you're wondering how these actually work, browsers just interpret the custom elements as unstyled inline elements, basically as `span`s, which I am free to do with as I wish.

Re:Show HN: Tply – a simple typewriter effect for your websites by fiatjaf on Tuesday February 23, 2016 @04:45PM (#11162603)
Is that standardized? So why doesn't all those libraries (mostly jQuery libraries) that perform DOM transformation use custom elements, instead of a lot of nested divs with custom classes?
Re:Show HN: Tply – a simple typewriter effect for your websites by ichub on Tuesday February 23, 2016 @11:27PM (#11164574)
Honestly, I'm not sure. If it was really an issue, it'd be trivial to change the script to render things as nested divs and spans. The appeal of custom elements, at least to me, is that it makes everything more concise and readable. I prefer reading <type>whatever</type> to <div class="type">whatever</div>.
Re:Show HN: Tply – a simple typewriter effect for your websites by josefdlange on Tuesday February 23, 2016 @10:42AM (#11159607)
So, any reason why this doesn't work in Safari (Version 9.0.3 (11601.4.4)?
Re:Show HN: Tply – a simple typewriter effect for your websites by ichub on Tuesday February 23, 2016 @12:49PM (#11160746)
Looks like Safari doesn't support `let` syntax yet. I fixed it, should work now. Thanks for letting me know (: