Sunday, September 8, 2013

How to use Jquery to get the string value of current cursor?

How to use Jquery to get the string value of current cursor?

I used this code to create bunch of alphabet character from a - z
var textAppend = $("<div>").html(textPre); // for loop keep changing textPre
$(".name-select-header").append(textAppend);
And after that I want to have a mouseover function implemented, inside the
function I want it to be able to get the value of current cursor at.
For example, If my mouse is on character "a", I want to display "apple" ,
"america" in a div section. if it is on "b", "banana" and "Benz" are
displayed in that div section.
So what should I do to make it happen?

No comments:

Post a Comment