html - Hide and show not working in jQuery -


i have 2 list in html in single page .. want when page loaded 1 list display, , other hidden,,

but when page loaded , both list there ,, after delay ,, other hidden

here html code

<div id="menu" class="menu-v" data-role="content">      <ul  class="listul">            <c:foreach items="${model.vaults}" var="vault" varstatus="count">             <li class="outer" id="${vault.vaultid}" name="${vault.vaultname}">               <div  class="listviewitem">                 <div class="squaredthree">                     <input type="checkbox" value="none" id="${vault.vaultid}" name="check" />                     <label for="${vault.vaultid}"></label>                 </div>                      <span>${vault.vaultname}</span>                     <div class='jump-link' id="${vault.vaultid}" name="${vault.vaultname}" >                     <a>detail</a>                       </div>                 </div>             </li>             </c:foreach>          </ul>                <ul class="tiles">                  <c:foreach items="${model.vaults}" var="vault" varstatus="count">                     <li id="safelayer">                        <img src="images/rectangle.png" id="safebase1" width="30" height="30" />                        <img src="images/rectangle.png" id="safebase2"  width="30" height="30"/>                         <div class="tile tile-small tile-${count.index} slidetextleft " id="${vault.vaultid}" name="${vault.vaultname}">                              <div  align="center">                                 <img src="images/vault/personal.png"  />                                  </div>                              <div class="nameblock" >                                <span>${vault.vaultname}</span>                              </div>                           </div>                             </li>                     </c:foreach>              </ul>             </div> 

and here jquery,,,

$(document).ready(function(){ $(".tiles").hide(); $(".listul").show(); 

});

please solve problem

you can add display:none default -

<ul class="tiles" style='display:none;'>


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -