I need an animated elipisis (...), one dot appearing after the other. The animation needs to loop. I'd like to achieve this via jQuery
Frame 1: Awaiting your selection
Frame 2: Awaiting your selection .
Frame 3: Awaiting your selection ..
Frame 4: Awaiting your selection ...
I've been researching a plugin to blink text and the pulsate .effect().
Does anyone have any reccomendations on the simplest and most reliable means of achieving this? I'd be happy to be pointed to a technique or function.
If you just need the dots to appear one after another only once, try something very simple like the following:
<div id="message">Awaiting your selection</div>
var dots = 0;
$(document).ready(function() {
setInterval (type, 600);
});
function type() {
if(dots < 3) {
$('#message').append('.');
dots++;
}
}
http://jsfiddle.net/fVACg/
If you want them to appear more than once (to be deleted and then re-printed), you can do something like the following:
<div>Awaiting your selection<span id="dots"></span></div>
var dots = 0;
$(document).ready(function() {
setInterval (type, 600);
});
function type() {
if(dots < 3) {
$('#dots').append('.');
dots++;
} else {
$('#dots').html('');
dots = 0;
}
}
http://jsfiddle.net/wdVh8/
Finally, checkout a tutorial I've written a few years ago. You might find it useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With