Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I change the blinking caret in a form/text area in a browser? [duplicate]

Tags:

html

caret

I want to have a custom text caret in my text field for my web page. I would like to have an old school block type blinking caret. Is this possible?

like image 363
Dave Avatar asked May 23 '11 04:05

Dave


1 Answers

The simple answer is you can't (change the user's blinking caret) via javascript, html, or css as that is created and managed by the chrome (the browser beyond the DOM)

Wanna fake it? http://www.dynamicdrive.com/forums/showthread.php?t=17450

The code examples shown are pretty old, but the idea remains the same-- Make a blinking box and have it tail the input...

With thats all said, I highly suggest against using it in anything but the smallest, niche, 'for fun' way as having a javascript function fire and be altering the DOM on every keyDown is bordering on user abuse imho.

like image 137
colinross Avatar answered Nov 15 '22 03:11

colinross