jquery panel with listview only open once on iOS #7189

riendo opened this Issue Feb 27, 2014 · 1 comment


None yet
2 participants

riendo commented Feb 27, 2014

I'm using jquery mobile 1.3.1, and dynamically append list elements to a unordered list in a jquery panel. The first time I open the panel everything works fine, but when I close it and try to open it again, it will not show. But I can still click on the screen where I know the list elements are in the panel, and do stuff. The panel is just not showing. If I do click on the list elements, the panel shows quickly before it close and disappear. If I empty my unordered list and append the list elements again, the panel will then show when I open it, but again only once. This is however just a iOS issue, on android it works perfectly. So please help, I can't understand what is wrong. Here is my code:

<script type="text/javascript" src="jsScript/jquery-1.10.1.js"></script>

 <script type="text/javascript" src="jsScript/jquery.mobile-1.3.1.js"></script>
  <link rel="stylesheet" type="text/css" href="cssScript/jquery.mobile-1.4.0.css" />

   <div id="mainMenu" style="display:none;" >

  <!--Left Panel-->
  <div data-role="panel" id="yourTurnPanel" data-display="overlay"  data-theme="a">
        <div class="navbar-header" id="yourTurnDiv">
            <h4 style="text-align:center;">Your Turn</h4>
        <ul id="yourTurnList" data-role="listview"  >
</div><!-- /panel -->

Here I empty and append the list

 var makeList = function(){
     $('#yourTurnList').append('<li data-rel="close" data-icon="false"  data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-iconpos="right" class="ui-btn"> <div>  Player <br> Round</div></li>');

 // the method that opens the panel
$("#yourTurn").click(function() {
  $("#yourTurnPanel").panel("open" , null); // works only once after appending the list elements

Sorry for the ugly code


jaspermdegroot commented Feb 27, 2014


Can you please provide a test page (not just code) that uses latest code. See the contributing guidelines for our JS Bin template and instructions. Also, what iOS version and on what Apple device did you test?
I am closing this ticket for now as incomplete. We will reopen when a test page has been provided and we can reproduce the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment