在页面上使用多个列表视图

时间:2012-01-19 23:59:14

标签: listview jquery-mobile

我在页面上使用的不仅仅是ListView,它似乎也是自动和菜单(使用listview)。

对于右侧的列表视图,我正在使用此代码:

<div>
 <ul data-role="listview">

<?php
   while ($row = mysqli_fetch_array($finding)) {
?>   
  <li> 
  <a href="/profiles/profile/id=<?php echo stripslashes($row['id']); ?>"><h3><?php echo stripslashes($row['surname']); ?>, <?php echo stripslashes($row['firstname']); ?></h3>
    <p><?php echo stripslashes($row['positions']); ?></p>
    <p><?php //echo stripslashes($row['email']); ?></p>
   </li>
<?php } ?>
</ul>
</div>

菜单列表视图使用以下代码:

<ul data-role="listview"  data-theme="c" data-dividertheme="d">
                    <li data-role="list-divider">userdata</li>
                     <!-- Use class .no-submenu to open link instead of a sub menu-->
                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'forums') {echo 'class="current"';} ?>><a href="/forums" title="" class="no-submenu forums">Forums</a></li>
                                    <!-- Use class .current to open submenu on page load -->

                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'wiki') {echo 'class="current"';} ?>><a href="/wiki" title="" class="dashboard no-submenu articles">Wiki</a></li>
                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'tracker') {echo 'class="current"';} ?>><a href="/tracker" title="" class="dashboard no-submenu tracker">Tracker</a><?php if ($trackcnt > "0") {echo '<span  style="background-color:#cf2020;color:#FFF;" title="There are '.$trackcnt.' open tickets">'.$trackcnt.'</span>';}?></li>
                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'bugs') {echo 'class="current"';} ?>><a href="/bugs" title="" class="dashboard no-submenu bug">Bug Reporting</a></li>
                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'staffdirectory') {echo 'class="current"';} ?>><a href="/staffdirectory" title="" class="dashboard no-submenu address">Staff Directory</a></li>
                                    <li <?php if (isset ($_REQUEST['d']) && $_REQUEST['d'] == 'settings') {echo 'class="current"';} ?>><a href="/settings" title="" class="settings" data-role="collapsible-set">Settings</a>
</ul>

screwed-up

关于这里发生了什么的任何想法?他们在不同的容器中。

1 个答案:

答案 0 :(得分:1)

缺少“a”结束标记修复此问题。