Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
198 lines (160 sloc) 6.68 KB
<!--
Copyright (c) 2012 Marco Pegoraro, http://movableapp.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WHERE TO FIND MEDIA TABLE:
https://github.com/thepeg/MediaTable
http://consulenza-web.com/jquery/MediaTable/
http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>MediaTable | Responsive Table | Plugin jQuery | www.consulenza-web.com</title>
<meta name="description" content="jQUery Plugin Media Table: adapt HTML tables to fit many screen sizes. Uses media-query and javascript. IE proof!" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<!-- MediaTable Plugin -->
<!-- This is all you need to copy in your page! -->
<link rel="stylesheet" href="jquery.mediaTable.css" />
<script src="jquery.mediaTable.js"></script>
<!-- Functional Script: this activate/deactivate MediaTable -->
<script type="text/javascript">
$(document).ready(function(){
$('#create').click(function(){ $('.mediaTable').mediaTable() });
$('#destroy').click(function(){ $('.mediaTable').mediaTable('destroy') });
$('.article a').click(function(e){
e.preventDefault();
$($(this).attr('href')).trigger('click');
});
});
</script>
<!-- Page Style, don't care about this code -->
<style type="text/css">
html { text-align:center; background: #fff; font-family: "Trebuchet MS"; font-size:1em; }
body { display:block; width:95%; margin:2em auto; text-align:left; }
a { color:#0063c5}
h1,h2 { margin:0; font-weight:normal; }
h2 { font-size:1em; margin-bottom:2em; }
.article { border-top:1px solid #444;border-bottom:1px solid #444;margin-bottom:2em;font-size:0.85em;line-height: 1.3em; color:#333; padding:0;}
.controls { text-align: center;margin-bottom:2em;}
.controls input { font-size:1em; padding:0.5em; }
#create { color:green }
#destroy { color:#900 }
.credits { margin-top:3em;text-align: center;font-size:0.8em; background: #ddd; text-shadow: 0 1px 0 #fff; padding:0.2em; }
.mediaTable { font-size:0.8em;}
</style>
<!--[if lt IE 9]>
<script src="respond.min.js"></script>
<![endif]-->
</head>
<body>
<h1>MediaTable</h1>
<h2>Responsive Table jQuery Plguin</h2>
<div class="article">
<h3>What does this plugin do?</h3>
<p>
<strong>MediaTable</strong> listen to screen size to define visible or hidden columns using <strong>CSS media query</strong>.<br>
You can choose what column to view with the automagically columns menu.
</p>
<p>
This is a usefull solution to display <strong>big data table into small screen devices</strong> allowing the user to display relevant data at the beginning then to <strong>choose what data to display</strong>.
</p>
<h3>How do I use this demo?</h3>
<ol>
<li>Look at the number of colums displayed in the table below</li>
<li>Click on <a href="#create">Enable MediaTable</a> to startup the widget</li>
<li>Look at the menu generated upon the table. You can choose what columns to display</li>
<li><strong>Resize the window</strong> (or change orientation on iPad) to see how table changes</li>
<li>Click on <a href="#destroy">Disable MediaTable</a> to completely remove the widget form the table</li>
</ol>
</div>
<!-- Example Controls -->
<div class="controls">
<input id="create" type="button" value="Enable MediaTable" />
<input id="destroy" type="button" value="Disable MediaTable" />
</div>
<!-- Example Data Table -->
<table class="mediaTable">
<thead>
<tr>
<th class="essential persist">Employee</th>
<th class="essential">xHTML</th>
<th class="optional">HTML5</th>
<th class="essential">CSS</th>
<th class="essential">JS</th>
<th class="optional">jQuery</th>
<th class="optional">jQueryUI</th>
<th>jQuery Mobile</th>
<th>Sencha Touch</th>
<th class="essential">PHP</th>
<th>PHP (OO)</th>
<th class="optional">CakePHP</th>
</tr>
</thead>
<tbody>
<tr>
<td>Marco Pegoraro</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
</tr>
<tr>
<td>Mario Rossi</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="yes">y</td>
<td class="no">n</td>
</tr>
<tr>
<td>Alberto Bianchi</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="yes">y</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
<td class="no">n</td>
</tr>
</tbody>
</table>
<div class="credits">
<p>Created by <a href="http://marcopeg.github.io" title="Marco Pegoraro Personal Blog" target="_blank">Marco Pegoraro</a> | Based upon a <a href="http://filamentgroup.com/lab/responsive_design_approach_for_complex_multicolumn_data_tables/" target="_blank">Filament Group</a> article | Fork on <a href="https://github.com/thepeg/MediaTable" target="_blank">GitHub</a></p>
</div>
</body>
</html>