1

I'm trying to use the letter tool I found in this tutorial to highlight text.

If I put text between the spans initially, it will work:

<span class="npc_dialog_dictionary_chinese">this will work...</span>

If I put my mouse over "this will work" text in between the spans, it works fine...


But I want to apply that to text that will be generated when $('.npc_dialog_dictionary_chinese').html(dialog_text); updates the span with the javascript variable dialog_text.

So let's say dialog_text is updated with "some text" when I press a key... and then the jquery html() function above updates the span... it is that generated text I'd like to be highlighted.

How can I get that to work?

Thanks!

Community
  • 1
  • 1
user3871
  • 12,432
  • 33
  • 128
  • 268

1 Answers1

2

Seems like you would have to reinitialize .lettering() on that text block.

andi
  • 6,442
  • 1
  • 18
  • 43