Changing data-theme of Collapsible listview

Changing data-theme of Collapsible listview

Hi,

i want to change the data-theme of a collapsible listview programmatically.

  1. <div data-role="collapsible" data-theme="b" data-content-theme="d" id="benutzer-div">
  2.                 <h3>Benutzer</h3>
  3.                     <ul data-role="listview">
  4.                     <li><a href="#sitzung" data-transition="fade">Sitzung</a></li>
  5.                         <li><a href="#messenger" data-transition="fade">Messenger</a></li>
  6.                         <li><a href="#benutzer" data-transition="fade">Benutzer&uuml;bersicht</a></li>
  7.                     </ul>
  8. </div>
  9.  

  1. $(document).on("pageshow", "#home", function () {
  2. $.ajax({
  3. type: "GET",
  4. url: "backend.php",
  5. data: {task: "check_User"},
  6. success: function(data){
  7. //alert(data);
  8. if(data == 1) {
  9. //data-theme e
  10. //how to switch?
  11. } else {
  12. //data-theme b
  13. //how to switch?
  14. }
  15. }
  16. });
  17. });


How can i switch my listview (id=benutzer-div) between data-theme e and b in my on.pageshow-function?


Michael