Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

According to number of questions and articles the simple tip.html = 'new value'; should work but for some reasons it's not the case for me.

Here I have created a demo to demonstrate that tip.html modification doesn't change tip's body after it was rendered once:

http://jsfiddle.net/zcYqe/1/

Steps to reproduce:

Scenario 1:

  1. Move mouse over red square to see the tip
  2. Press button
  3. See the tip isn't changed

Scenario 2:

  1. Press button (not - don't put mouse over red square)
  2. See the tip's value has changed

What am I missing? How would one change it in runtime (Scenario 1)?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You can't just set a property, once the component is created you need to call a method so it actually updates the underlying DOM:

tip.update('new');

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.