Permalink
Browse files

Added demo

  • Loading branch information...
1 parent a101632 commit 810c132e7d1ea18ae576eb21e0a94dba5dba675c @pjamest committed Jul 23, 2012
Showing with 21 additions and 5 deletions.
  1. +21 −4 demo/index.html
  2. +0 −1 jquery.taTabbing.js
View
@@ -3,21 +3,38 @@
<head>
<meta charset="utf-8">
- <title>Demo</title>
+ <title>taTabbing demo</title>
<script type="text/javascript" src="../dependencies/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../jquery.taTabbing.js"></script>
+
+ <style type="text/css">
+ body {
+ margin: 50px;
+ }
+ textarea {
+ font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", Monospace;
+ }
+ </style>
</head>
<body>
-<textarea rows="20" cols="80"></textarea>
+<textarea rows="20" cols="80">def hello
+ message = "Hello World"
+ puts message
+end
+
+def bye
+ message = "Goodbye World"
+ puts message
+end</textarea>
<script>
$(function() {
- $("textarea").taTabbing();
+ $("textarea").taTabbing({ tabString: ' ' });
});
</script>
</body>
-</html>
+</html>
View
@@ -82,7 +82,6 @@
if (lines[firstLine].substr(0, tabStringLength) === this.options.tabString) {
selectionStart -= tabStringLength;
}
-
for (i = firstLine; i <= lastLine; i++) {
if (lines[i].substr(0, tabStringLength) === this.options.tabString) {
selectionEnd -= tabStringLength;

0 comments on commit 810c132

Please sign in to comment.