Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
jquery-typewrite
Advanced tools
Type the content of an HTML element, character by character
There's a few plugins out there allowing you to type some text character by character, however I haven't been able to find one which would allow my to type HTML elements along with the text. You can even nest the HTML elements inside and it will still work.
It replaces all the HTML tags inside the element with a placeholder character. When finding this character whilst typing the text, it will insert the element and call .typewrite()
on it recursively and wait until the context of the element is typed out to continue typing the rest of the text.
Install using bower: bower install jquery-typewrite
Or using npm: npm install jquery-typewrite
Or just by downloading the tarball
The .typewrite()
function allows a callback which will be called once all the text has been typed.
$("#my-novel").typewrite();
$("#my-short-story").typewrite(function() { console.log('done'); });
There is also a .stopTypewrite()
which will render all the content immediately and call the callback if one has been set.
$("#my-novel").stopTypewrite();
Type: Integer
Default: 60
The amount of time, in milliseconds, between each character.
Type: String
Default: ¶
The character used for replacing HTML tags. If you wish to use the default character ¶
in your text, you can choose your own by setting this option.
If you set this option don't forget to set it too if you call .stopTypewrite()
.
$("#my-novel").typewrite({ delay: 180 }, function () {
console.log("All the text has been typed");
});
FAQs
Type character by character the content of an HTML element.
The npm package jquery-typewrite receives a total of 0 weekly downloads. As such, jquery-typewrite popularity was classified as not popular.
We found that jquery-typewrite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.