Динамическое изменение значка в списке jQuery MobileJquery

Программирование на jquery
Anonymous
Динамическое изменение значка в списке jQuery Mobile

Сообщение Anonymous »

Когда я динамически меняю значок, он не отражает изменение на странице, хотя в разметке он был изменен.

Пример:

Код: Выделить всё

      [list]
[*][url=#]Adam Kinkaid[/url]
[*][url=#]Alex Wickerham[/url]
[*][url=#]Avery Johnson[/url]
[*][url=#]Bob Cabot[/url]
[*][url=#]Caleb Booth[/url]
[*][url=#]Christopher Adams[/url]
[*][url=#]Culver James[/url]
[/list]

$("li").tap(function() {
//Alert the old icon
alert($(this).jqmData("icon"));

//Toggle
$(this).jqmData("icon") == "false" ? $(this).jqmData("icon", "check") :             $(this).jqmData("icon", "false");

//Alert the new icon
alert($(this).jqmData("icon"));
});
http://jsfiddle.net/Mc97V/

Подробнее здесь: https://stackoverflow.com/questions/151 ... e-listview

Вернуться в «Jquery»