Changing data-theme of Collapsible listview
Hi,
i want to change the data-theme of a collapsible listview programmatically.
- <div data-role="collapsible" data-theme="b" data-content-theme="d" id="benutzer-div">
- <h3>Benutzer</h3>
- <ul data-role="listview">
- <li><a href="#sitzung" data-transition="fade">Sitzung</a></li>
- <li><a href="#messenger" data-transition="fade">Messenger</a></li>
- <li><a href="#benutzer" data-transition="fade">Benutzerübersicht</a></li>
- </ul>
- </div>
- $(document).on("pageshow", "#home", function () {
-
- $.ajax({
- type: "GET",
- url: "backend.php",
- data: {task: "check_User"},
- success: function(data){
- //alert(data);
- if(data == 1) {
- //data-theme e
- //how to switch?
- } else {
- //data-theme b
- //how to switch?
- }
- }
- });
-
- });
How can i switch my listview (id=benutzer-div) between data-theme e and b in my on.pageshow-function?
Michael