0

To update below div :

    <div id="toadd" data-role="content">
        <p>Page 1 content</p>
                <ul data-role="listview" data-theme="g">
    <li><a href="bmw.html">BMW</a></li>
</ul>
    </div>

I'm using :

  $(document).ready(function() {                   
          $("#toadd ul").append("<li><a href=\"acura.html\">tes</a></li>");
       }   
    });

The problem is that the link is being add as a standard href :

enter image description here

How can I update the code so that 'test' uses the same jquery mobile styling as 'BMW' in attached image ?

blue-sky
  • 51,962
  • 152
  • 427
  • 752

1 Answers1

1

try $("#toadd ul").append("<li><a href=\"acura.html\">tes</a></li>").listview('refresh');

Check another post

Community
  • 1
  • 1
Binz
  • 36
  • 4