From 869231dc2d78da64b76fc6de9ea709d4e09d61d5 Mon Sep 17 00:00:00 2001 From: Alessandro Benoit Date: Thu, 23 Jul 2015 22:29:02 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 103 +++++++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 35edd5d..0fb0a48 100755 --- a/README.md +++ b/README.md @@ -5,63 +5,72 @@ jQuery ReStable 0.1.2 To use it you just have to include jQuery and a copy of the plugin in your head or footer: - - - +```html + + + +``` Let's say this is your table: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PeriodFull BoardHalf BoardBed and Breakfast
01/10/12 - 02/10/1220 €30 €40 €
03/10/12 - 04/10/1240 €50 €60 €
05/10/12 - 06/10/1270 €80 €90 €
- +```html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PeriodFull BoardHalf BoardBed and Breakfast
01/10/12 - 02/10/1220 €30 €40 €
03/10/12 - 04/10/1240 €50 €60 €
05/10/12 - 06/10/1270 €80 €90 €
+``` Now the only thing to do is to trigger the action with: - $(window).ready(function () { - $.ReStable(); - }); +```js +$(document).ready(function () { + $.ReStable(); +}); +``` This will target automatically all the tables in the page but you can, off course, target one or more elements with: - $(window).ready(function () { - $('.mytable').ReStable(); - }); +```js +$(document).ready(function () { + $('.mytable').ReStable(); +}); +``` If you need more control here's the plugin settings: - $('.mytable').ReStable({ - rowHeaders: true, // Table has row headers? - maxWidth: 480, // Size to which the table become responsive - keepHtml: false // Keep the html content of cells - }); - +```js +$('.mytable').ReStable({ + rowHeaders: true, // Table has row headers? + maxWidth: 480, // Size to which the table become responsive + keepHtml: false // Keep the html content of cells +}); +``` + ## Credits and contacts -ReStable has been made by [me](http://codeb.it). You can contact me at micc83@gmail.com or [twitter](https://twitter.com/Micc1983) for any issue or feauture request. +ReStable has been made by [me](http://codeb.it). You can contact me at micc83@gmail.com or [twitter](https://twitter.com/Micc1983) for any issue or feature request. From 2db798dd26e8ffbffd67e32dd177a9daaea37b37 Mon Sep 17 00:00:00 2001 From: Alessandro Benoit Date: Tue, 1 Sep 2020 09:32:34 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0fb0a48..7b5f99e 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ jQuery ReStable 0.1.2 ======== -**jQuery ReStable** is a very simple and lightweight (~1Kb) jQuery plugin that make tables responsive making them collapse into ul lists.You can find some examples in the included demo or [here](http://codeb.it/restable/). +**jQuery ReStable** is a very simple and lightweight (~1Kb) jQuery plugin that make tables responsive making them collapse into ul lists.You can find some examples in the included demo. To use it you just have to include jQuery and a copy of the plugin in your head or footer: @@ -73,4 +73,4 @@ $('.mytable').ReStable({ ## Credits and contacts -ReStable has been made by [me](http://codeb.it). You can contact me at micc83@gmail.com or [twitter](https://twitter.com/Micc1983) for any issue or feature request. +ReStable has been made by [me](https://github.com/micc83). You can contact me at micc83@gmail.com or [twitter](https://twitter.com/Micc1983) for any issue or feature request.