One simple question if you can help tune it.....
I have above your script (your solution) the code above. Now the problem is that it continues in all the spans so for example the first name is B is red. How can i edit this so it applies per letter gorup e.g. A, B.. I hope you understand me :-)
What this does is working on the divs that are direct children of #addToHere - $("#addToHere>div"), it finds all of the odd spans -.find("span:odd") and adds a class "red" - .addClass("red"). Then the end() reverts back to the previous objects -("#addToHere>div"), finds the even spans and adds a class "blue".
The odd ones are the second, fourth etc - this is because it is 0 based.
Refael
ASKER
JonNorman,
You are jquery Ninja :-)
Thank you so so much for all the help and thank you for explaining how this works.
Simply genius!!!
One simple question if you can help tune it.....
I have above your script (your solution) the code above. Now the problem is that it continues in all the spans so for example the first name is B is red. How can i edit this so it applies per letter gorup e.g. A, B.. I hope you understand me :-)
Open in new window