6 <meta name="description" content="Ratchet: Prototype iPhone apps with simple HTML, CSS and JS components.">
7 <meta name="author" content="Dave Gamache, Connor Sears, and Jacob Thornton">
8 <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
9 <link rel="shortcut icon" href="favicon.ico"/>
10 <meta name="apple-mobile-web-app-capable" content="yes">
11 <meta name="apple-mobile-web-app-status-bar-style" content="black">
12 <link rel="stylesheet" href="../dist/ratchet.css">
13 <link rel="stylesheet" href="css/docs.css">
14 <link rel="stylesheet" href="css/prettify.css">
15 <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
16 <script type="text/javascript" src="//use.typekit.net/gwz1sef.js"></script>
17 <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
19 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/apple-touch-icon-114x114.png">
20 <link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/apple-touch-icon-72x72.png">
21 <link rel="apple-touch-icon-precomposed" sizes="57x57" href="img/apple-touch-icon-57x57.png">
23 <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
24 <script src="js/prettify.js"></script>
25 <script src="../dist/ratchet.js"></script>
26 <script src="js/docs.js"></script>
27 <script src="js/fingerblast.js"></script>
28 <script type="text/javascript">
30 var _gaq = _gaq || [];
31 _gaq.push(['_setAccount', 'UA-36050008-1']);
32 _gaq.push(['_trackPageview']);
35 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
36 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
37 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
43 <body ontouchstart="">
45 <!-- Masthead & navigation -->
46 <nav class="docs-outer-wrapper docs-masthead">
47 <div class="docs-inner-wrapper">
48 <ul class="docs-navigation">
49 <li class="nav-item"><a href="#gettingStarted">Getting started</a></li>
50 <li class="nav-item nav-components">
51 <a data-ignore="push" class="nav-components-link" href="">Components</a>
52 <ul class="components-list">
53 <li><a href="#bars">Bars</a></li>
54 <li><a href="#lists">Lists</a></li>
55 <li><a href="#buttons">Buttons</a></li>
56 <li><a href="#segmentedControllers">Segmented controllers</a></li>
57 <li><a href="#counts">Counts</a></li>
58 <li><a href="#forms">Forms</a></li>
59 <li><a href="#toggles">Toggles</a></li>
60 <li><a href="#popovers">Popovers</a></li>
61 <li><a href="#sliders">Sliders</a></li>
62 <li><a href="#push">Push</a></li>
65 <li class="nav-item"><a href="#pageSetup">Page setup</a></li>
66 <li data-ignore="push" class="nav-item"><a href="http://github.com/maker/ratchet">View on Github</a></li>
68 <h1 class="docs-masthead-title">Ratchet</h1>
73 <header class="docs-outer-wrapper docs-header">
74 <div class="docs-inner-wrapper">
75 <hgroup class="docs-header-text">
76 <h2 class="docs-header-subtitle">Prototype iPhone apps with simple HTML, CSS and JS components.</h2>
77 <a data-ignore="push" href="#" class="docs-btn" onClick="_gaq.push(['_trackEvent', 'Downloads', 'V1.0']);">Download Ratchet</a>
80 <section class="social">
83 <iframe src="http://ghbtns.com/github-btn.html?user=maker&repo=ratchet&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
86 <a data-ignore="push" href="https://twitter.com/share" class="twitter-share-button" data-url="http://maker.github.com/ratchet/" data-text="Ratchet: Prototype iPhone apps with simple HTML, CSS and JS components." data-via="GoRatchet">Tweet</a>
87 <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
89 <li><a data-ignore="push" href="https://twitter.com/GoRatchet" class="twitter-follow-button" data-show-count="true">
91 <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
97 <div class="docs-outer-wrapper docs-content">
98 <section class="content-section section-informational" id="gettingStarted">
99 <div class="docs-inner-wrapper">
100 <div class="section-header">
101 <h2 class="section-title">Getting started</h2>
102 <p class="section-description">Once you've downloaded Ratchet, here's what to do next.</p>
107 <h3 class="step-title">1. Create your pages</h3>
108 <p class="step-description">Use these docs as a reference for all the available components and piece together the pages of your app. Customize the style too - make the prototype all your own.</p>
111 <h3 class="step-title">2. Connect pages with push.js</h3>
112 <p class="step-description">Read about <a href="#push">push.js</a> then start connecting your pages. Push.js allows you to create a prototype that feels like a real app when you save it to your phone. (Need to have a server running).</p>
115 <h3 class="step-title">3. Save the prototype to your phone</h3>
116 <p class="step-description">There are <a href="https://groups.google.com/forum/#!topic/goratchet/IboE6SCMAyw">a few ways to do this</a>, but the simplest is to run a local server on your computer, point Safari on your iPhone to your computer, then click the <img class="share-icon" src="img/icon-share.png"> button and "Add to Home Screen".</p>
122 <!-- Banner for Mozilla/IE -->
123 <div class="notice-banner">
124 <p><strong>Heads up!</strong> Ratchet components are written only for iPhone, so many are broken in non-Webkit browsers.</p>
128 <div class="notice-banner">
129 <p><strong>Heads up!</strong> Ratchet components are written only for iPhone, so many are broken in non-Webkit browsers.</p>
135 <section class="docs-outer-wrapper content-section section-components">
136 <div class="docs-inner-wrapper">
137 <div class="section-header">
138 <h2 class="section-title">Components</h2>
139 <p class="section-description">Design patterns that serve as basic building blocks.</p>
142 <div class="iphone-content">
144 <header class="bar-title">
145 <h1 class="title">Title</h1>
152 <article class="component active" id="bars">
153 <h3 class="component-title">Title bar</h3>
154 <p class="component-description">Title bars are full width and docked to the top of the viewport.</p>
156 <div class="component-example component-example-fullbleed">
157 <header class="bar-title">
158 <h1 class="title">Title</h1>
162 <pre class="prettyprint">
163 <header class="bar-title">
164 <h1 class="title">Title</h1>
170 <article class="component">
171 <h3 class="component-title">Title bar with buttons</h3>
172 <p class="component-description">Buttons in a title bar are left or right aligned and should be used for actions.</p>
174 <div class="component-example component-example-fullbleed">
175 <header class="bar-title">
179 <h1 class="title">Title</h1>
186 <pre class="prettyprint">
187 <header class="bar-title">
188 <a class="button" href="#">
191 <h1 class="title">Title</h1>
192 <a class="button" href="#">
199 <article class="component">
200 <h3 class="component-title">Title bar with directional buttons</h3>
201 <p class="component-description">Directional buttons in a title bar should be used for navigational purposes.</p>
203 <div class="component-example component-example-fullbleed">
204 <header class="bar-title">
205 <a class="button-prev">
208 <h1 class="title">Title</h1>
209 <a class="button-next">
215 <pre class="prettyprint">
216 <header class="bar-title">
217 <a class="button-prev" href="#">
220 <h1 class="title">Title</h1>
221 <a class="button-next" href="#">
229 <article class="component">
230 <h3 class="component-title">Title bar with segmented controller</h3>
231 <p class="component-description">Title bars can also house segmented controllers (with or without accompanying buttons). It all uses flex-box to create perfectly even spacing no matter their labels.</p>
233 <div class="component-example component-example-fullbleed">
234 <header class="bar-title">
238 <ul class="segmented-controller">
255 <pre class="prettyprint">
256 <header class="bar-title">
257 <a class="button" href="#">
260 <ul class="segmented-controller">
261 <li class="active">
262 <a href="#">One</a>
265 <a href="#">Two</a>
268 <a href="#">Three</a>
271 <a class="button" href="#">
279 <article class="component">
280 <h3 class="component-title">Tab bar</h3>
281 <p class="component-description">Icons should be around 24px by 18px. The gradient on an icon starts with pure white and goes to #e5e5e5 at the bottom.</p>
283 <div class="component-example component-example-fullbleed">
284 <nav class="bar-tab">
285 <ul class="tab-inner">
286 <li class="tab-item active">
288 <img class="tab-icon" src="img/icon-home.png">
289 <div class="tab-label">Label</div>
292 <li class="tab-item">
294 <img class="tab-icon" src="img/icon-profile.png">
295 <div class="tab-label">Label</div>
298 <li class="tab-item">
300 <img class="tab-icon" src="img/icon-messages.png">
301 <div class="tab-label">Label</div>
304 <li class="tab-item">
306 <img class="tab-icon" src="img/icon-hamburger.png">
307 <div class="tab-label">Label</div>
310 <li class="tab-item">
311 <a href="http://starwars.com">
312 <img class="tab-icon" src="img/icon-settings.png">
313 <div class="tab-label">Label</div>
320 <pre class="prettyprint">
321 <nav class="bar-tab">
322 <ul class="tab-inner">
323 <li class="tab-item active">
324 <a href="">
325 <img class="tab-icon" src="img/icon-home.png">
326 <div class="tab-label">Label</div>
329 <li class="tab-item">
330 <a href="">
331 <img class="tab-icon" src="img/icon-profile.png">
332 <div class="tab-label">Label</div>
335 <li class="tab-item">
336 <a href="">
337 <img class="tab-icon" src="img/icon-messages.png">
338 <div class="tab-label">Label</div>
341 <li class="tab-item">
342 <a href="">
343 <img class="tab-icon" src="img/icon-hamburger.png">
344 <div class="tab-label">Label</div>
347 <li class="tab-item">
348 <a href="">
349 <img class="tab-icon" src="img/icon-settings.png">
350 <div class="tab-label">Label</div>
357 <p class="component-note touch-only"><strong>Note:</strong> Use push.js to actually change content.</p>
358 <p class="component-note"><strong>Credit:</strong> Icons by Marc Haumann and Spencer Cohen from The Noun Project</p>
361 <article class="component">
362 <h3 class="component-title">Standard bars</h3>
363 <p class="component-description">Standard bars are basic fixed elements that can be positioned in 3 places. These can be used to house buttons or segmented controllers (see following examples).</p>
365 <div class="component-example component-example-fullbleed">
366 <!-- Segmented controller in standard bar fixed to top -->
367 <nav class="bar-standard">
368 <ul class="segmented-controller">
381 <!-- Block button in standard bar fixed below top bar -->
382 <div class="bar-standard bar-header-secondary">
383 <a class="button-block">Block level button</a>
387 <pre class="prettyprint">
388 <!-- Segmented controller in standard bar fixed to top -->
389 <nav class="bar-standard">
390 <ul class="segmented-controller">
391 <li class="active">
392 <a href="#">Thing one</a>
395 <a href="#">Thing two</a>
398 <a href="#">Thing three</a>
402 <div class="bar-standard bar-header-secondary">
403 <a class="button-block">Block level button</a>
410 <article class="component" id="lists">
411 <h3 class="component-title">Lists</h3>
412 <p class="component-description">Lists can be used for organizing data, showing collections of links or a series of controls.</p>
414 <div class="component-example component-example-fullbleed">
418 <li class="list-divider">List Divider</li>
423 <pre class="prettyprint">
424 <ul class="list">
425 <li>List item 1</li>
426 <li>List item 2</li>
427 <li class="list-divider">List Divider</li>
428 <li>List item 3</li>
434 <article class="component">
435 <h3 class="component-title">List with chevrons</h3>
436 <p class="component-description">Chevrons are created with CSS3, so no image assets are needed. They should be used to indicate that the list item is linked.</p>
438 <div class="component-example component-example-fullbleed">
443 <span class="chevron"></span>
449 <span class="chevron"></span>
455 <span class="chevron"></span>
461 <pre class="prettyprint">
462 <ul class="list">
464 <a href="#">
466 <span class="chevron"></span>
470 <a href="#">
472 <span class="chevron"></span>
476 <a href="#">
478 <span class="chevron"></span>
486 <article class="component">
487 <h3 class="component-title">List with counts</h3>
489 <div class="component-example component-example-fullbleed">
491 <li>List item 1 <span class="count">4</span></li>
492 <li>List item 2 <span class="count">1</span></li>
493 <li>List item 3 <span class="count">5</span></li>
497 <pre class="prettyprint">
498 <ul class="list">
499 <li>List item 1 <span class="count">4</span></li>
500 <li>List item 2 <span class="count">1</span></li>
501 <li>List item 3 <span class="count">5</span></li>
507 <article class="component">
508 <h3 class="component-title">List with counts and chevrons</h3>
510 <div class="component-example component-example-fullbleed">
515 <span class="chevron"></span>
516 <span class="count">4</span>
522 <span class="chevron"></span>
523 <span class="count">1</span>
529 <span class="chevron"></span>
530 <span class="count">5</span>
536 <pre class="prettyprint">
537 <ul class="list">
539 <a href="#">
541 <span class="chevron"></span>
542 <span class="count">4</span>
546 <a href="#">
548 <span class="chevron"></span>
549 <span class="count">1</span>
553 <a href="#">
555 <span class="chevron"></span>
556 <span class="count">5</span>
564 <article class="component">
565 <h3 class="component-title">List with buttons</h3>
567 <div class="component-example component-example-fullbleed">
569 <li>List item 1 <a class="button">Button</a></li>
570 <li>List item 2 <a class="button-main">Button</a></li>
571 <li>List item 3 <a class="button-positive">Button</a></li>
572 <li>List item 4 <a class="button-negative">Button</a></li>
576 <pre class="prettyprint">
577 <ul class="list">
578 <li>List item 1 <a class="button">Button</a></li>
579 <li>List item 2 <a class="button-main">Button</a></li>
580 <li>List item 3 <a class="button-positive">Button</a></li>
581 <li>List item 4 <a class="button-negative">Button</a></li>
587 <article class="component">
588 <h3 class="component-title">List with toggles</h3>
590 <div class="component-example component-example-fullbleed">
595 <div class="toggle-handle"></div>
600 <div class="toggle active">
601 <div class="toggle-handle"></div>
607 <div class="toggle-handle"></div>
613 <pre class="prettyprint">
614 <ul class="list">
617 <div class="toggle">
618 <div class="toggle-handle"></div>
623 <div class="toggle active">
624 <div class="toggle-handle"></div>
629 <div class="toggle">
630 <div class="toggle-handle"></div>
638 <article class="component">
639 <h3 class="component-title">Inset list</h3>
641 <div class="component-example">
642 <ul class="list inset">
645 <li class="list-divider">List Divider</li>
651 <pre class="prettyprint">
652 <ul class="list inset">
653 <li>List item 1</li>
654 <li>List item 2</li>
655 <li class="list-divider">List Divider</li>
656 <li>List item 3</li>
657 <li>List item 4</li>
664 <article class="component" id="buttons">
665 <h3 class="component-title">Buttons</h3>
666 <p class="component-description">Buttons come in four flavors and should be used for user actions.</p>
668 <div class="component-example">
669 <a class="button">Button</a>
670 <a class="button-main">Button</a>
671 <a class="button-positive">Button</a>
672 <a class="button-negative">Button</a>
675 <pre class="prettyprint">
676 <a class="button">Button</a>
677 <a class="button-main">Button</a>
678 <a class="button-positive">Button</a>
679 <a class="button-negative">Button</a>
684 <article class="component" id="buttonsCounts">
685 <h3 class="component-title">Buttons with counts</h3>
687 <div class="component-example">
688 <a class="button">Count button<span class="count">1</span></a>
689 <a class="button-main">Count button<span class="count">1</span></a>
690 <a class="button-positive">Count button<span class="count">1</span></a>
691 <a class="button-negative">Count button<span class="count">1</span></a>
694 <pre class="prettyprint">
695 <a class="button">Count button<span class="count">1</span></a>
696 <a class="button-main">Count button<span class="count">1</span></a>
697 <a class="button-positive">Count button<span class="count">1</span></a>
698 <a class="button-negative">Count button<span class="count">1</span></a>
703 <article class="component" id="blockButtons">
704 <h3 class="component-title">Block buttons</h3>
706 <div class="component-example">
707 <a class="button-block">Block button</a>
708 <a class="button-main button-block">Block button</a>
709 <a class="button-positive button-block">Block button</a>
710 <a class="button-negative button-block">Block button</a>
713 <pre class="prettyprint">
714 <a class="button-block">Block button</a>
715 <a class="button-main button-block">Block button</a>
716 <a class="button-positive button-block">Block button</a>
717 <a class="button-negative button-block">Block button</a>
722 <!-- Segmented Controller -->
723 <article class="component" id="segmentedControllers">
724 <h3 class="component-title">Segmented controller</h3>
725 <p class="component-description">Created with flex-box so button sizes and spacing are consistent. Content sections that are to be swapped in and out by the controller should all be siblings and have the class "segmented-controller-item". Then, just give each content section an id and point the link in the segmented controller to that id.</p>
727 <div class="component-example">
728 <ul class="segmented-controller">
730 <a href="#item1mobile">Thing one</a>
733 <a href="#item2mobile">Thing two</a>
736 <a href="#item3mobile">Thing three</a>
739 <ul class="inset list">
740 <li id="item1mobile" class="segmented-controller-item active">
743 <li id="item2mobile" class="segmented-controller-item">
746 <li id="item3mobile" class="segmented-controller-item">
752 <pre class="prettyprint">
753 <ul class="segmented-controller">
754 <li class="active">
755 <a href="#item1">Thing one</a>
758 <a href="#item2">Thing two</a>
761 <a href="#item3">Thing three</a>
764 <ul class="inset list">
765 <li id="item1" class="segmented-controller-item active">
768 <li id="item2" class="segmented-controller-item">
771 <li id="item3" class="segmented-controller-item">
780 <article class="component" id="counts">
781 <h3 class="component-title">Counts</h3>
782 <p class="component-description">Counts come in four flavors and should be used to indicate "how many" of something there are.</p>
784 <div class="component-example">
785 <span class="count">1</span>
786 <span class="count-main">2</span>
787 <span class="count-positive">3</span>
788 <span class="count-negative">4</span>
791 <pre class="prettyprint">
792 <span class="count">1</span>
793 <span class="count-main">2</span>
794 <span class="count-positive">3</span>
795 <span class="count-negative">4</span>
801 <article class="component" id="forms">
802 <h3 class="component-title">Forms</h3>
804 <div class="component-example">
806 <input type="text" placeholder="Full name">
807 <input type="search" placeholder="Search">
808 <textarea rows="5"></textarea>
809 <a class="button button-block">Choose existing</a>
813 <pre class="prettyprint">
815 <input type="text" placeholder="Full name">
816 <input type="search" placeholder="Search">
817 <textarea rows="5"></textarea>
818 <a class="button button-block">Choose existing</a>
824 <!-- Form with input group -->
825 <article class="component" id="formsWithInputGroup">
826 <h3 class="component-title">Form with input group</h3>
828 <div class="component-example">
829 <form class="input-group">
830 <input type="text" placeholder="Full name">
831 <input type="email" placeholder="Email">
832 <input type="text" placeholder="Username">
836 <pre class="prettyprint">
838 <div class="input-group">
839 <input type="text" placeholder="Full name">
840 <input type="email" placeholder="Email">
841 <input type="text" placeholder="Username">
848 <!-- Form with input group and labels -->
849 <article class="component" id="formsWithInputGroupAndLabels">
850 <h3 class="component-title">Form with input group and labels</h3>
852 <div class="component-example">
853 <form class="input-group">
854 <div class="input-row">
855 <label>Full name</label>
856 <input type="text" placeholder="Mister Ratchet">
858 <div class="input-row">
860 <input type="email" placeholder="ratchetframework@gmail.com">
862 <div class="input-row">
863 <label>Username</label>
864 <input type="text" placeholder="goRatchet">
869 <pre class="prettyprint">
871 <div class="input-group">
872 <div class="input-row">
873 <label>Full name</label>
874 <input type="text" placeholder="Mister Ratchet">
876 <div class="input-row">
877 <label>Email</label>
878 <input type="email" placeholder="ratchetframework@gmail.com">
880 <div class="input-row">
881 <label>Username</label>
882 <input type="text" placeholder="goRatchet">
891 <article class="component" id="toggles">
892 <h3 class="component-title">Toggles</h3>
893 <p class="component-description">Toggles can be used by sliding or tapping the control.</p>
895 <div class="component-example">
896 <div class="toggle active">
897 <div class="toggle-handle"></div>
900 <div class="toggle-handle"></div>
904 <pre class="prettyprint">
905 <div class="toggle active">
906 <div class="toggle-handle"></div>
908 <div class="toggle">
909 <div class="toggle-handle"></div>
913 <p class="component-description">Toggles.js binds an event to the document that returns a detail object and can be used to fire a callback.</p>
915 <pre class="prettyprint js">
916 // Only needed if you want to fire a callback
918 .querySelector('#myToggle')
919 .addEventListener('toggle', myFunction)
925 <article class="component" id="popovers">
926 <h3 class="component-title">Popovers</h3>
928 <div class="component-example">
929 <div id="popover" class="popover">
930 <header class="popover-header">
934 <h3 class="title">Popover title</h3>
948 <pre class="prettyprint">
949 <div id="myPopover" class="popover">
950 <header class="popover-header">
951 <a class="button" href="#">
954 <h3 class="title">Popover title</h3>
955 <a class="button" href="#">
959 <ul class="list">
960 <li>Item1</li>
961 <li>Item2</li>
962 <li>Item3</li>
963 <li>Item4</li>
968 <p class="component-description">Popovers are designed to only fire from <a href="#bars">title bars</a>. Set the value of the title href to the id of a popover, like so:</p>
970 <pre class="prettyprint">
971 <header class="bar-title">
972 <a href="#myPopover">
973 <h1 class="title">Title</h1>
981 <article class="component" id="sliders">
982 <h3 class="component-title">Sliders</h3>
983 <p class="component-description">Can be used with any number of slides with any type of content.</p>
985 <div class="component-example component-example-fullbleed">
986 <div class="slider" id="mySlider">
989 <img src="img/slide-1.jpg">
990 <span class="slide-text">← Slide me</span>
993 <img src="img/slide-2.jpg">
996 <img src="img/slide-3.jpg">
1002 <pre class="prettyprint">
1003 <div class="slider">
1006 <img src="img/slide-1.jpg">
1007 <span class="slide-text">← Slide me</span>
1010 <img src="img/slide-2.jpg">
1013 <img src="img/slide-3.jpg">
1019 <p class="component-description">Sliders.js binds an event to the document that returns a detail object and can be used to fire a callback.</p>
1021 <pre class="prettyprint js">
1022 // Only needed if you want to fire a callback
1024 .querySelector('#mySlider')
1025 .addEventListener('slide', myFunction)
1031 <article class="component" id="push">
1032 <h3 class="component-title">Push</h3>
1033 <p class="component-description">Push.js is the engine that connects Ratchet pages together with AJAX and the history api. Push.js is listening to all clicks on a page, so just make sure it's included and link something in your Ratchet project up.</p>
1035 <pre class="prettyprint js">
1036 <!-- A one.html link -->
1037 <a href="two.html">Two<a>
1040 <p class="component-note">This will use push to replace everything in the .content div with the .content of two.html. It will also update .bar-title and .bar-tab if you have them on both pages.</p>
1042 <p class="component-description">Now that pages are being loaded through push, it's easy to specify transitions for animations between pages. There are three different transitions to chose from: <code>fade</code>, <code>slide-in</code>, or <code>slide-out</code>.</p>
1044 <pre class="prettyprint js">
1045 <!-- An one.html link that animates to two.html -->
1046 <a href="two.html" data-transition="fade">Two<a>
1049 <p class="component-description">A working version of push:</p>
1051 <div class="component-example component-example-fullbleed">
1052 <header class="bar-title">
1053 <h1 class="title">Push</h1>
1055 <div class="content">
1058 <a href="two.html" data-transition="slide-in">
1059 Load new page with push
1061 <span class="chevron"></span>
1067 <pre class="prettyprint push-example">
1068 <header class="bar-title">
1069 <h1 class="title">Push</h1>
1071 <div class="content">
1072 <ul class="list">
1074 <a href="two.html" data-transition="slide-in">
1077 <span class="chevron"></span>
1083 <p class="component-description">Have a link you don't want to intercepted by push? Try this:</p>
1085 <pre class="prettyprint js">
1086 <!-- Use data-ignore="push" to prevent the push.js interception -->
1087 <a href="http://www.google.com" data-ignore="push">Google<a>
1090 <p class="component-description">Push.js binds an event to the document that returns a detail object and can be used to fire a callback.</p>
1092 <pre class="prettyprint js">
1093 // Only needed if you want to fire a callback
1094 window.addEventListener('push', myFunction);
1102 <section class="content-section section-informational" id="pageSetup">
1103 <div class="docs-inner-wrapper">
1104 <div class="section-header">
1105 <h2 class="section-title">Page setup</h2>
1106 <p class="section-description">3 simple rules for structuring your Ratchet pages</p>
1111 <h3 class="step-title">1. Fixed bars come first</h3>
1112 <p class="step-description">All fixed bars (<code>.bar-title, .bar-tab, .bar-header-secondary, .bar-footer)</code>) should always be the first thing in the <code><body></code> of the page. This is really important!</p>
1115 <h3 class="step-title">2. Everything else goes in <code>.content</code></h3>
1116 <p class="step-description">Anything that's not a <code>.bar-title</code> or <code>.bar-tab</code> should be put in a div with the class "<code>content</code>". Put this div after the bars in the <code><body></code> tag. The <code>.content</code> div is what actually scrolls in a Ratchet prototype.</p>
1119 <h3 class="step-title">3. Don't forget your meta tags</h3>
1120 <p class="step-description">They're included in the template.html page included in the download, but make sure they stay in the page. They are important to Ratchet working just right.</p>
1127 <div class="docs-outer-wrapper docs-footer">
1128 <section class="content-section">
1129 <div class="docs-inner-wrapper">
1130 <h3>License & credit</h3>
1131 <p>Ratchet is under the the MIT license, meaning you're basically free to use the framework as you please. Ratchet was lovingly crafted by <a data-ignore="push" href="http://www.twitter.com/dhg">Dave Gamache</a>, <a data-ignore="push" href="http://www.twitter.com/connors">Connor Sears</a>, and <a data-ignore="push" href="http://www.twitter.com/fat">Jacob Thornton</a>. </p>
1132 <ul class="avatars">
1134 <a data-ignore="push" class="avatar" href="http://www.twitter.com/dhg">
1135 <img src="https://secure.gravatar.com/avatar/14267e25aa6c7ef4f396afc483d6f238?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" alt="">
1137 <a data-ignore="push" href="https://twitter.com/dhg" class="twitter-follow-button" data-show-count="false">Follow @dhg</a>
1140 <a data-ignore="push" class="avatar" href="http://www.twitter.com/connors">
1141 <img src="https://secure.gravatar.com/avatar/53d633ae4622de17906338910085275a?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" alt="">
1143 <a data-ignore="push" href="https://twitter.com/connors" class="twitter-follow-button" data-show-count="false">Follow @connors</a>
1146 <a data-ignore="push" class="avatar" href="http://www.twitter.com/fat">
1147 <img src="https://secure.gravatar.com/avatar/a98244cbdacaf1c0b55499466002f7a8?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" alt="">
1149 <a data-ignore="push" href="https://twitter.com/fat" class="twitter-follow-button" data-show-count="false">Follow @fat</a>