Page 1 of 1

Label visual not updating

Posted: Sun Feb 03, 2013 3:45 am
by New Mobile Guy

Seems like this should be really easy, and I'm pulling exactly what to do from the documentation.

I have a label called "likes" and I need to set the test that shows here from javascript.

Here's what I'm doing to do that:
var likes = Tiggr('likes');
likes.val('Likes: test');

This doesn't seem to do anything to the label. However, if I do an alert(likes.val()); I get the right value. So something is changing, but it's not appearing on the screen.

I checked the source code and see the "likes" label is there:

default value

Seems like it's just not working. Any ideas?


Label visual not updating

Posted: Sun Feb 03, 2013 4:12 am
by maxkatz

.val() is for input component. For label, use .text(). You can always refer to jQuery or jQuery Mobile docs to find out what methods are available on what components.