0

If you add items to a listview, you'll need to call the refresh() method on it to update the styles and create any nested lists that are added. For example:

$('#mylist').listview('refresh');

What code I need if I add buttons to the page and refresh the style.

Gajotres
  • 57,309
  • 16
  • 102
  • 130
alexander-fire
  • 1,082
  • 4
  • 27
  • 52
  • Create a new button or change text? like this http://jsfiddle.net/Palestinian/HkmyB/ – Omar Apr 05 '13 at 07:46

1 Answers1

1

This one:

$('buttonID').button();

Working example: http://jsfiddle.net/Gajotres/m4rjZ/

There's also another function called buttonMarkup(), it is used to change some already styled button properties, for example to change button icon:

$('buttonID').buttonMarkup({ icon: "star" });

Read more about it in my other article: jQuery Mobile: Markup Enhancement of dynamically added content

And a link to an official documentation.

Community
  • 1
  • 1
Gajotres
  • 57,309
  • 16
  • 102
  • 130