Search code examples
jquerycssfootable

FooTable: Toggle icon is missing?


I am trying to use FooTable as standalone version. I copy/paste the code of this example and included jQuery.js, fontawesome.css, and footable js/css.

On the example page page, you see that a toggle plus icon appers as soon as columns are hidden. However, on my copy of the example, no toggle icon appears. Am I missing something?


Edit I just check the same file on Windows 7 computer and on a different device with Ubuntu. On both the icon does not appear.


This is how my example looks:

enter image description here

Here is my code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>title</title>
    <link rel="stylesheet" href="style.css">
    <!-- FontAwesome-->
    <link rel="stylesheet" href="/resources/vendor/font-awesome/css/font-awesome.min.css">
    <ling rel="stylesheet" href="css/footable.standalone.css">

      <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
      <script>window.jQuery || document.write('<script src="/resources/vendor/jQUery/jquery-1.11.2.min.js"><\/script>')</script>

    <script src="js/footable.min.js"></script>

  </head>
  <body>Check if fontawesome is loaded: <i class="fa fa-plus" aria-hidden="true"></i>

    <table class="table">
    <thead>
        <tr>
            <th data-breakpoints="xs">ID</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th data-breakpoints="xs">Job Title</th>
            <th data-breakpoints="xs sm">Started On</th>
            <th data-breakpoints="xs sm md" data-title="DOB">Date of Birth</th>
        </tr>
    </thead>
    <tbody>
        <tr >
            <td>1</td>
            <td>Dennise</td>
            <td>Fuhrman</td>
            <td>High School History Teacher</td>
            <td>November 8th 2011</td>
            <td>July 25th 1960</td>
        </tr>
        <tr>
            <td>2</td>
            <td>Elodia</td>
            <td>Weisz</td>
            <td>Wallpaperer Helper</td>
            <td>October 15th 2010</td>
            <td>March 30th 1982</td>
        </tr>
        <tr>
            <td>3</td>
            <td>Raeann</td>
            <td>Haner</td>
            <td>Internal Medicine Nurse Practitioner</td>
            <td>November 28th 2013</td>
            <td>February 26th 1966</td>
        </tr>
        <tr>
            <td>4</td>
            <td>Junie</td>
            <td>Landa</td>
            <td>Offbearer</td>
            <td>October 31st 2010</td>
            <td>March 29th 1966</td>
        </tr>
        <tr>
            <td>5</td>
            <td>Solomon</td>
            <td>Bittinger</td>
            <td>Roller Skater</td>
            <td>December 29th 2011</td>
            <td>September 22nd 1964</td>
        </tr>
        <tr>
            <td>6</td>
            <td>Bar</td>
            <td>Lewis</td>
            <td>Clown</td>
            <td>November 12th 2012</td>
            <td>August 4th 1991</td>
        </tr>
        <tr>
            <td>7</td>
            <td>Usha</td>
            <td>Leak</td>
            <td>Ships Electronic Warfare Officer</td>
            <td>August 14th 2012</td>
            <td>November 20th 1979</td>
        </tr>
        <tr>
            <td>8</td>
            <td>Lorriane</td>
            <td>Cooke</td>
            <td>Technical Services Librarian</td>
            <td>September 21st 2010</td>
            <td>April 7th 1969</td>
        </tr>
    </tbody>
</table>

<script>
jQuery(function($){
    $('.table').footable();

});
</script>
  </body>
</html>

Solution

  • The reason why the icon was not shown was because the footable.min.css wasn't included. This is because I wrote

    <ling rel="stylesheet" href="css/footable.standalone.css">

    instead of

    <link rel="stylesheet" href="css/footable.standalone.css">