I\'m new to Javascript and would like to modify a text string by clicking on individual characters. The string is: 0000 0000 0000 0000
representing a binary num
You can't assign event to single character in text.
You would have to assign click handler to node holding the text, and then check caret position to determine yourself which of the character has been clicked.
One of other possible solutions could be splitting text 0000 0000 0000 0000
, so that every character is wrapped in span
element for example. Then you can bind click handler to those spans and easily determine which character has been clicked because click event will be fired for one, specific character.