Permalink
Browse files

Example page

  • Loading branch information...
1 parent 74475df commit 5bac6085fcb832d6a85426ecda1ff35295716ec7 @sangregoriopaolo sangregoriopaolo committed Jan 30, 2012
Showing with 27 additions and 86 deletions.
  1. +27 −86 index.html
View
@@ -1,88 +1,29 @@
<!DOCTYPE html>
<html>
-<head>
- <meta charset='utf-8'>
-
- <title>Pandalab/jquery-splitView @ GitHub</title>
-
- <style type="text/css">
- body {
- margin-top: 1.0em;
- background-color: #7a3f56;
- font-family: Helvetica, Arial, FreeSans, san-serif;
- color: #ffffff;
- }
- #container {
- margin: 0 auto;
- width: 700px;
- }
- h1 { font-size: 3.8em; color: #85c0a9; margin-bottom: 3px; }
- h1 .small { font-size: 0.4em; }
- h1 a { text-decoration: none }
- h2 { font-size: 1.5em; color: #85c0a9; }
- h3 { text-align: center; color: #85c0a9; }
- a { color: #85c0a9; }
- .description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
- .download { float: right; }
- pre { background: #000; color: #fff; padding: 15px;}
- hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
- .footer { text-align:center; padding-top:30px; font-style: italic; }
- </style>
-</head>
-
-<body>
- <a href="https://github.com/Pandalab/jquery-splitView"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
-
- <div id="container">
-
- <div class="download">
- <a href="https://github.com/Pandalab/jquery-splitView/zipball/master">
- <img border="0" width="90" src="https://github.com/images/modules/download/zip.png"></a>
- <a href="https://github.com/Pandalab/jquery-splitView/tarball/master">
- <img border="0" width="90" src="https://github.com/images/modules/download/tar.png"></a>
- </div>
-
- <h1><a href="https://github.com/Pandalab/jquery-splitView">jquery-splitView</a>
- <span class="small">by <a href="https://github.com/Pandalab">Pandalab</a></span></h1>
-
- <div class="description">
-
- </div>
-
-
-
-
-
-
-
-
-
-
- <h2>Authors</h2>
- <p>Paolo Sangregorio (sangregorio.paolo@gmail.com)<br/> </p>
-
-
-
- <h2>Contact</h2>
- <p>Pandalab (info@pandalab.it)<br/> </p>
-
-
- <h2>Download</h2>
- <p>
- You can download this project in either
- <a href="https://github.com/Pandalab/jquery-splitView/zipball/master">zip</a> or
- <a href="https://github.com/Pandalab/jquery-splitView/tarball/master">tar formats.
- </p>
- <p>You can also clone the project with <a href="http://git-scm.com">Git</a>
- by running:
- <pre>$ git clone git://github.com/Pandalab/jquery-splitView</pre>
- </p>
-
- <div class="footer">
- get the source code on GitHub : <a href="https://github.com/Pandalab/jquery-splitView">Pandalab/jquery-splitView</a>
- </div>
-
- </div>
-
-</body>
-</html>
+ <head>
+ <link rel="stylesheet" href="jquery.splitView.css" type="text/css" media="screen" charset="utf-8">
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" charset="utf-8"></script>
+ <script type="text/javascript" src="jquery.splitView.js" charset="utf-8"></script>
+ </head>
+ <body>
+ <a href="https://github.com/Pandalab/jquery-splitView"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
+ <script type="text/javascript" charset="utf-8">
+ $(document).ready(function() {
+ var splitView = $("#split-view").splitView({
+ noTableDataMessage: "No messages",
+ noDetailDataMessage: "Select an item on the left to show it",
+ tableViewDataSource: "data.json",
+ dataReceived: function(data) {
+ for (i in data.messages) {
+ splitView.addTableViewRow(data.messages[i].title, data.messages[i].message.substr(0, 100), data.messages[i].date, { fullText: data.messages[i].message });
+ }
+ },
+ rowClicked: function(data) {
+ splitView.loadDetail(data.fullText);
+ }
+ });
+ });
+ </script>
+ <div id="split-view"></div>
+ </body>
+</html>

0 comments on commit 5bac608

Please sign in to comment.