GeoSal
GeoSal

Reputation: 333

jQuery mobile navbar not fixed only for "Samsung Galaxy S, SII, W" Emulator on Chrome

I'm using Chrome's emulation on the console, and when I try to test my code on all the devices, I get this quirky behavior in Samsung Galaxy S, SII, W Emulator in particular. I don't understand why !

Here's my code :

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>Identification</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../CasaElectionsMobileApp/public/jquery.mobile-1.4.4/jquery.mobile-1.4.4.css">
<link rel="stylesheet" href="../CasaElectionsMobileApp/public/dataTables/media/css/jquery.dataTables.css">
<link href="../CasaElectionsMobileApp/public/jquery.mobile-1.4.4/jquery.mobile.structure-1.4.4.min.css" rel="stylesheet" />
<script src="../CasaElectionsMobileApp/public/jquery-2.1.1.min.js"></script>
<script src="../CasaElectionsMobileApp/public/jquery-1.11.2.js"></script>
<script src="../CasaElectionsMobileApp/public/jquery.mobile-1.4.4/jquery.mobile-1.4.4.js"></script>
<script src="../CasaElectionsMobileApp/public/dataTables/media/js/jquery.dataTables.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $('#datatable1').DataTable();
    } );
</script>
</head>

<body>
<div data-role="page">
    <div data-role="header" data-theme="b" data-position="fixed">
        <h1>Elections</h1>
    </div><!-- /header -->
    <div role="main" class="ui-content">
    </div>

        <table id="datatable1" class="display" cellspacing="0">
            <thead>
                <tr>
                    <th>Status</th>
                    <th>Nom</th>
                    <th>Prénom</th>
                    <th>CIN</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th>Status</th>
                    <th>Nom</th>
                    <th>Prénom</th>
                    <th>CIN</th>
                </tr>
            </tfoot>
            <tbody>
                <tr>
                    <td>Y</td>
                    <td>AZERTY</td>
                    <td>QWERTY</td>
                    <td>KKKKKK</td>
                </tr>
                <tr>
                    <td>Y</td>
                    <td>AZERTY</td>
                    <td>QWERTY</td>
                    <td>JJJJJJ</td>
                </tr>
            </tbody>
    </table>

    <div data-role="footer" data-id="foo2" data-position="fixed" data-theme="b">
        <div data-role="navbar">
            <ul>
                <li><a href="accueil.html" data-icon="home" data-transition="slide">Accueil</a></li>
                <li><a href="identificationElecteurs.html" data-icon="user" data-transition="slide">Identification</a></li>
                <li><a href="resultatsScrutin.html" data-icon="action" data-transition="slide">Résultats</a></li>
            </ul>
        </div><!-- /navbar -->
    </div><!-- /footer -->
</div>
</body>
</html>

Here's the output :

Samsung S, SII, W Emulator on Chrome

And when I try other emulator :

Samsung Galaxy S4

Apple iPhone 6

I want the footer navbar to be persistent on the bottom of the page no matter what transition is made, I believe that data-position="fixed" should do the trick no matter what device we're testing on, right? Then what could be wrong? Thanks in advance !

Upvotes: 1

Views: 144

Answers (0)

Related Questions