Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble getting Typed.js blinking cursor inside form input

Using the Typed.js jQuery plugin, I have been trying to get the blinking cursor to appear inside the form input. I have tried messing around with it and even copying examples that I found online exactly, but it still appears outside the form input. Any ideas?

here is a fiddle showing the issue:

http://jsfiddle.net/dunphyben/1pp3x3au/1/

$(function(){
    $(".form-control").typed({
        strings: ["Web Developer", "Graphic Designer", "Mobile Developer", "Road Warrior", "DevOps", "Real Estate Agent", "Accountant", "Product Manager", "CEO"],
        attr: "placeholder",
        typeSpeed: 100
    });
});
like image 586
Benjamin Dunphy Avatar asked Dec 11 '25 18:12

Benjamin Dunphy


2 Answers

remove the blinking css animation and add an empty string using quotations, like so:

,"" at the end of the cycle you'll have a blinking cursor.
$(function(){
    $(".form-control").typed({
        strings: ["Web Developer", "pimp", ""],
        attr: "placeholder",
        typeSpeed: 100
    });
});

UPDATED fiddle http://jsfiddle.net/1pp3x3au/16/

like image 172
Thisismint Avatar answered Dec 13 '25 07:12

Thisismint


I know this is an old post and you may not even be using this anymore, but you just need to float your holding class left:

.yourclass {
    float: left;
}
like image 44
Eric Novak Avatar answered Dec 13 '25 06:12

Eric Novak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!