JQuery Mobile Table

前端 未结 3 1874
别那么骄傲
别那么骄傲 2020-12-14 20:29

Can anyone point me to any sample or can provide any sample of a Jquery Mobile table please?

I\'ve seen the demos on their website and found no tables.

I nee

相关标签:
3条回答
  • 2020-12-14 21:01

    And if you want a crazy alternative you can always create a listview with grids in it. It might look interesting.

    0 讨论(0)
  • 2020-12-14 21:04

    Try this layout instead

    <ul>
    <li> <!--first item -->
        <table>
            <tr>
                <td>Heading1</td>
                <td>Meaning1</td>
            </tr>
            <tr>
                <td>Heading2</td>
                <td>Meaning2</td>
            </tr>
            <tr>
                <td>Heading3</td>
                <td>Meaning3</td>
            </tr>
        </table>
    </li>
    <li> <!-- second item -->
        <table>
            <tr>
                <td>Heading1</td>
                <td>Meaning1</td>
            </tr>
            <tr>
                <td>Heading2</td>
                <td>Meaning2</td>
            </tr>
            <tr>
                <td>Heading3</td>
                <td>Meaning3</td>
            </tr>
        </table>
    </li>
    </ul>
    

    and the css

    ul {
        width: 100%;    
        margin-left: 0px;
        padding: 0px; 
    }
    
    ul li {
        list-style-type: none;
        border-bottom: 1px dashed gray;
        margin-top: 10px; 
    }
    

    *fixed small bugs but have to add this to make substantial edit

    0 讨论(0)
  • 2020-12-14 21:19

    http://jquerymobile.com/demos/1.0a4.1/#docs/forms/../../docs/content/content-html.html right click and view source:

    <table summary="This table lists all the JetBlue flights."> 
      <caption>Travel Itinerary</caption> 
      <thead> 
        <tr> 
           <th scope="col">Flight:</th>  
          <th scope="col">From:</th>  
          <th scope="col">To:</th>  
        </tr> 
      </thead> 
      <tfoot> 
        <tr> 
          <td colspan="5">Total: 3 flights</td> 
        </tr> 
      </tfoot> 
      <tbody> 
      <tr> 
        <th scope="row">JetBlue 983</th> 
        <td>Boston (BOS)</td> 
        <td>New York (JFK)</td> 
      </tr> 
      <tr> 
        <th scope="row">JetBlue 354</th> 
        <td>San Francisco (SFO)</td> 
        <td>Los Angeles (LAX)</td> 
      </tr> 
    <tr> 
        <th scope="row">JetBlue 465</th> 
        <td>New York (JFK)</td> 
        <td>Portland (PDX)</td> 
      </tr> 
      </tbody> 
    </table> 
    

    CSS

    <style type="text/css"> 
        table { width:100%; }
        table caption { text-align:left;  }
        table thead th { text-align:left; border-bottom-width:1px; border-top-width:1px; }
        table th, td { text-align:left; padding:6px;} 
    </style> 
    

    Updating the Links:

    • http://jquerymobile.com/demos/1.2.0/docs/content/content-html.html
    • http://jquerymobile.com/branches/swipe/docs/tables/index.html ( beta )
    0 讨论(0)
提交回复
热议问题