Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Test case for Ojay.AjaxTabs.

  • Loading branch information...
commit 658a70b29b6088984170d7f34264e165fee124bc 1 parent ea69929
@beastaugh beastaugh authored
View
2  site/site/javascripts/test/tabs.js
@@ -1,3 +1,5 @@
var tabs = new Ojay.Tabs('#container1 .tab');
tabs.setup();
+var ajaxTabs = new Ojay.AjaxTabs('#links a', '#container2');
+ajaxTabs.setup();
View
3  site/src/pages/service/tabs/01.haml
@@ -0,0 +1,3 @@
+%p
+ %q Either mathematics is too big for the human mind or the human mind is more than a machine.
+ %cite Kurt Gödel
View
3  site/src/pages/service/tabs/02.haml
@@ -0,0 +1,3 @@
+%p
+ %q Are you really sure that a floor can't also be a ceiling?
+ %cite M.C. Escher
View
3  site/src/pages/service/tabs/03.haml
@@ -0,0 +1,3 @@
+%p
+ %q It's easy to play any musical instrument: all you have to do is touch the right key at the right time and the instrument will play itself.
+ %cite J.S. Bach
View
77 site/src/pages/test/tabs.haml
@@ -1,30 +1,61 @@
%h1 Tabs tests
:plain
- <style type="text/css">
- #container1 {border:1px solid #ccc; clear:both;}
- .tab {clear:both; padding:9px;}
- .tab P {margin:0 0 1em 0;}
- .toggles {margin:0; padding:0 0 0 10px; *zoom:1;}
- .toggles LI {float:left; cursor:pointer; list-style:none; margin:0 5px -1px 0; border:1px solid #ccc; padding:9px; _position:relative;}
- .toggles LI.selected {border-bottom-color:#fff; background-color:#fff;}
- </style>
+ <style type="text/css">
+ #container1, #container2 {margin-bottom:30px; border:1px solid #ccc; clear:both; max-width:500px}
+ #container1 .tab, #container2 .tab {clear:both; padding:9px;}
+ #container1 .tab P {margin:0 0 1em 0;}
+
+ .toggles {margin:0; padding:0 0 0 10px; *zoom:1;}
+ .toggles li {float:left; cursor:pointer; list-style:none; margin:0 5px -1px 0; border:1px solid #ccc; padding:9px; _position:relative;}
+ .toggles li.selected {border-bottom-color:#fff; background-color:#fff;}
+
+ #links {}
+ #links li {margin-bottom:0; border:none; padding:0;}
+ #links li a {display:block; margin-bottom:-1px; border:1px solid #ccc; padding:9px; _position:relative; outline:none; text-decoration:none; font-weight:bold;}
+ #links li a.selected {border-bottom-color:#fff;}
+
+ #container3 {width:192px; height:192px; border:1px solid #666; padding:32px;}
+
+ #thumbnails {margin:6px 0 30px 0; padding:0;}
+ #thumbnails li {float:left; margin:0 6px 0 0; border:1px solid #666; padding:0; list-style:none;}
+ #thumbnails .thumb {display:block; outline:none; text-decoration:none;}
+ #thumbnails .thumb IMG {display:block; margin:0; border:none; padding:0;}
+ #thumbnails .selected {opacity:0.5;}
+ </style>
+
+%h2
+ %code Ojay.Tabs
#container1
- .tab
- .toggle First
- %p
- %q Have nothing in your houses that you do not know to be useful, or believe to be beautiful.
- %cite William Morris
- .tab
- .toggle Second
- %p
- %q If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases.
- %cite Larry Wall
- .tab
- .toggle Third
- %p
- %q A great many people think they are thinking when they are merely rearranging their prejudices.
- %cite William James
+ .tab
+ .toggle First
+ %p
+ %q Have nothing in your houses that you do not know to be useful, or believe to be beautiful.
+ %cite William Morris
+ .tab
+ .toggle Second
+ %p
+ %q If you give someone Fortran, he has Fortran. If you give someone Lisp, he has any language he pleases.
+ %cite Larry Wall
+ .tab
+ .toggle Third
+ %p
+ %q A great many people think they are thinking when they are merely rearranging their prejudices.
+ %cite William James
+
+
+%h2
+ %code Ojay.AjaxTabs
+
+%ul#links.toggles
+ %li
+ %a{:href => "/service/tabs/01.html"} G
+ %li
+ %a{:href => "/service/tabs/02.html"} E
+ %li
+ %a{:href => "/service/tabs/03.html"} B
+#container2
+
=javascripts 'test/tabs'
Please sign in to comment.
Something went wrong with that request. Please try again.