jquery - How to determine position (x,y) relative to the page of every character inside spans through javascript? -


this simple can get.

i have several spans randomly positioned on screen through like:

 $(".hidden:first").css('-webkit-transform','rotate('+((0.5-math.random())*40)+'deg)'); $(".hidden:first").animate({ left: '+=' + (((screen.width-800-224)/2) + math.random()*800), top: '+=' + (50+math.random()*600) } [...] 

and later on iterate through every char of every of elements (that randomly position , have random rotation), , need discover (x,y) position of every character on screen can colorize it, forming draws according functions.

is achievable? remembering want (x,y) position of each -character- of span, not (x,y) of span itself. inexperienced @ javascript.

edit: answering own question: managed needed wrapping every single letter inside <span> , later accessing .offset().left , .offset().top through jquery. bad? :p

thanks. fernando.

something might started http://jsfiddle.net/qgrwk/


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -