Guest User

Untitled

a guest
Jan 17th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. div(data-role='content')
  2. div(class='content-primary')
  3. ul(data-role="listview", data-split-theme='a',data-split-icon='gear')
  4. li(data-theme='a')
  5. a(href="")
  6. div(id='addClientDivId')
  7. a(href='#', data-icon='delete', title=' Delete ')
  8.  
  9. var newContent = '<div data-role="content" data-theme="a" class="content-primary">';
  10. newContent += '<ul data-role="listview" data-split-theme="a" data-inset="true" id="ulId">';
  11. newContent += '<li>';
  12. newContent += '<a href="">';
  13. newContent += '<h4></h4>';
  14. newContent += '<h5></h5>';
  15. newContent += '<a href="" , data-icon="delete">';
  16. newContent += '</a>';
  17. newContent += '</a>';
  18. newContent += '</li>';
  19. newContent += '</ul>';
  20. newContent += '</div>';
  21. $("#addClientDivId").append(newContent).trigger('create');
  22.  
  23. var contentDiv = $('<div></div>').attr('data-role','content');
  24. var contentPrimary = $('<div></div>').attr('class', 'content-primary');
  25. var ul = $('<ul></ul>');
  26. $(ul).attr('data-role', 'listview').attr('data-split-theme', 'a').attr('data-split-icon','gear');
  27.  
  28. for(..) {
  29. var li = $('<li></li>');
  30. var liContent = $('<a></a>').attr('href', 'a');
  31. // You can build the rest of your li content here.
  32.  
  33. // Append the li content to the li
  34. $(li).append(liContent);
  35.  
  36. // And then append the li to the ul
  37. $(ul).append(li);
  38. }
  39.  
  40. $(contentPrimary).append(ul);
  41. $(contentDiv).append(contentPrimary);
  42.  
  43. $('body').append(contentDiv);
  44.  
  45. var contentDivAsString = '<div data-role="content">....</div>';
  46. $('body').append($(contentDivAsString));
  47.  
  48. var aMain=$('<a/>', {
  49. 'text':'Delete',
  50. 'href':'',
  51. 'data-icon':'delete',
  52. 'title':' Delete '
  53. });
  54. var acDivid=$('<div id="addClientDivId"></div>');
  55. var a=$('<a href=""></a>');
  56. var li=$('<li data-theme="a"></li>');
  57. var ul=$('<ul />', {
  58. 'data-role':'listview',
  59. 'data-split-theme':'a',
  60. 'data-split-icon':'gear'
  61. });
  62. var cP=$('<div class="content-primary"></div>');
  63. var content=$('<div data-role="content"></div>');
  64. $('body').append(content.append(cP.append(ul.append(li.append(a.append(acDivid.append(aMain)))))));
Add Comment
Please, Sign In to add comment