I have requirement of client in which I need to display cursor of all input tag with type "text" as horizontal cursor as cursor appears in Command prompt.
I think it may be possible with the help of jQuery.
I have requirement of client in which I need to display cursor of all input tag with type "text" as horizontal cursor as cursor appears in Command prompt.
I think it may be possible with the help of jQuery.
You might need to think outside the box on this one.
Try making component that mimics a textbox with a blinking cursor inside of it.
<div id="box"><span id="cursor" class="blink">_</span></div>
And adding some behavior:
setInterval(function blink () {
$('#cursor').toggleClass('hidden');
}, 600);
$(document.body).on('keypress', function(event) {
$('#cursor').before(String.fromCharCode(event.keyCode));
});
This isn't a solution, but should give you an idea: http://jsfiddle.net/EDLEB/
Honestly, I'm not really sure if this is possible or not. Take a look at this fiddle and let me know. If anyone has feedback or ideas about it, that would be appreciated.
Javascript
var element = document.createElement('input');
var blinker = document.getElementsByTagName('span');
element.value = blinker;
document.getElementsByTagName('input').append(blinker);