daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $("#addBttn").click(function() {
  2.  
  3.       // adding a LI with Nested List in Main List
  4.       var li = '<li data-icon="false" data-theme="a"><a>NEW ITEM</a>'
  5.  
  6.                  + '<ul data-role="listview" data-inset="true" data-theme="h" data-dividertheme="a">'
  7.                      + '<li data-icon="false" data-theme="b">'
  8.                      + '<a>NEW ITEM 1</a></li>'
  9.                      + '<li data-icon="false" data-theme="b">'
  10.                      + '<a>NEW ITEM 2</a></li>'          
  11.                  + '</ul>'
  12.  
  13.                + '</li>';
  14.  
  15.     $("#newsListContent").append(li).trigger('create');
  16.     $("#newsListContent").listview('refresh');
  17. });
  18.    
  19. var i=1;
  20. $('#addBttn').click(function() {
  21.  
  22.      // adding a LI with Nested List in Main List
  23.      var li = '<li data-icon="false" data-theme="a">NEW '+i+'</li>';
  24.      $('#newsListContent').append(li);
  25.  
  26.     var ul = '<ul data-role="listview" data-inset="true" data-theme="h" data-dividertheme="a" id="ul_'+i+'">'
  27.                      + '<li data-icon="false" data-theme="b">'
  28.                      + 'NEW ITEM '+i+'</li>'
  29.                      + '<li data-icon="false" data-theme="b">'
  30.                      + 'NEW ITEM '+i+'</li>'          
  31.                  + '</ul>';  
  32.     $('#newsListContent li:last').append(ul).trigger('create');
  33.  
  34.     $('#newsListContent').listview('refresh');
  35.  
  36.     i++;
  37. });
  38.    
  39. <a href="#list&ui-page=newsListContent-0" class="ui-link-inherit">FOOD</a>
  40.    
  41. <div data-role="page" data-url="list&ui-page=newsListContent-0" data-theme="d" data-count-theme="c" tabindex="0" class="ui-page ui-body-d">
  42.     <div data-role="header" data-theme="b" class="ui-header ui-bar-b"
  43.         role="banner">
  44.         <div class="ui-title">FOOD</div>
  45.     </div>
  46.     <div data-role="content" class="ui-content" role="main">
  47.         <ul data-role="listview" data-inset="true" data-theme="d"
  48.             data-dividertheme="a"
  49.             class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
  50.             <li data-icon="false" data-theme="a"
  51.                 class="ui-li ui-li-static ui-body-a ui-corner-top">FOOD ITEM 1</li>
  52.             <li data-icon="false" data-theme="a"
  53.                 class="ui-li ui-li-static ui-body-a">FOOD ITEM 2</li>
  54.             <li data-icon="false" data-theme="a"
  55.                 class="ui-li ui-li-static ui-body-a ui-corner-bottom">FOOD
  56.                 ITEM 3</li>
  57.         </ul>
  58.     </div>
  59. </div>
  60.    
  61. <a class="ui-link ui-link-inherit" href="#list&ui-page=newsListContent-0">NEW ITEM</a>
  62.    
  63. <div data-role="page" data-url="list&ui-page=newsListContent-0" data-theme="h" data-count-theme="c" tabindex="0" class="ui-page ui-body-h">
  64.     <div data-role="header" data-theme="b" class="ui-header ui-bar-b"
  65.         role="banner">
  66.         <div class="ui-title">NEW ITEM</div>
  67.     </div>
  68.     <div data-role="content" class="ui-content" role="main">
  69.         <ul data-role="listview" data-inset="true" data-theme="h"
  70.             data-dividertheme="a"
  71.             class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
  72.             <li data-icon="false" data-theme="b"
  73.                 class="ui-btn ui-btn-up-b ui-btn-icon-right ui-li ui-corner-top"><div
  74.                     class="ui-btn-inner ui-li ui-corner-top">
  75.                     <div class="ui-btn-text">
  76.                         <a class="ui-link-inherit">NEW ITEM 1</a>
  77.                     </div>
  78.                 </div></li>
  79.             <li data-icon="false" data-theme="b"
  80.                 class="ui-btn ui-btn-up-b ui-btn-icon-right ui-li ui-corner-bottom"><div
  81.                     class="ui-btn-inner ui-li">
  82.                     <div class="ui-btn-text">
  83.                         <a class="ui-link-inherit">NEW ITEM 2</a>
  84.                     </div>
  85.                 </div></li>
  86.         </ul>
  87.     </div>
  88. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top