Jquerymobile 动态创建元素

Dynamic content doesn't get styled automatically.  Buttons need to be styled with customButton(), and other element types have their own functions. 

所以以动态创建button为例,应该是

<script>
 $(function(){
    $("#d").append("<a href=\"#\" data-role=\"button\" data-icon=\"delete\">Delete</a>").find('a[data-role=button]').customButton();
});
 </script>

你可能感兴趣的:(职场,动态,元素,jquerymobile,休闲)