├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── changelog.md ├── demo ├── css │ ├── application.css │ ├── common.css │ ├── demo.css │ ├── font-awesome.css │ ├── normalize.css │ ├── pygments.css │ └── stepy.demo.css ├── font │ └── fontawesome-webfont.ttf ├── img │ ├── alert.png │ ├── error.png │ ├── image-1.png │ ├── image-2.png │ └── image-3.png └── index.html ├── karma.conf.js ├── lib ├── jquery.stepy.css └── jquery.stepy.js ├── package-lock.json ├── package.json └── spec ├── fixtures ├── back_and_next_buttons_inside_step.html ├── default.html ├── form_with_submit_button.html └── global_buttons.html ├── javascripts ├── common_spec.js ├── functions │ ├── destroy_spec.js │ └── step_spec.js ├── markup │ ├── descriptions_spec.js │ ├── fields_spec.js │ ├── header_spec.js │ ├── on_click_back_button_spec.js │ ├── on_click_next_button_spec.js │ └── titles_spec.js └── options │ ├── back_button_spec.js │ ├── back_spec.js │ ├── block_spec.js │ ├── description_spec.js │ ├── enter_spec.js │ ├── error_image_spec.js │ ├── finish_button_spec.js │ ├── finish_spec.js │ ├── header_spec.js │ ├── legend_spec.js │ ├── next_button_spec.js │ ├── next_spec.js │ ├── select_spec.js │ ├── title_target_spec.js │ ├── transition_spec.js │ └── validate_spec.js └── spec_helper.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 9 3 | 4 | before_script: 5 | - export CHROME_BIN=chromium-browser 6 | - export DISPLAY=:99.0 7 | - sh -e /etc/init.d/xvfb start 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2018 Washington Botelho 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jQuery Stepy - A Wizard Plugin 2 | 3 | [![Build Status](https://img.shields.io/travis/wbotelhos/stepy/master.svg)](https://travis-ci.org/wbotelhos/stepy) 4 | [![NPM Version](https://badge.fury.io/js/stepy.svg)](https://badge.fury.io/js/stepy) 5 | [![Dependency](https://david-dm.org/wbotelhos/stepy.svg)](https://david-dm.org/wbotelhos/stepy) 6 | [![Dev Dependency](https://david-dm.org/wbotelhos/stepy/dev-status.svg)](https://david-dm.org/wbotelhos/stepy#info=devDependencies) 7 | [![Code Climate](https://codeclimate.com/github/wbotelhos/stepy.png)](https://codeclimate.com/github/wbotelhos/stepy) 8 | [![Support](https://img.shields.io/badge/donate-%3C3-brightgreen.svg)](https://liberapay.com/wbotelhos) 9 | 10 | jQuery Stepy is a plugin that generates a customizable wizard. 11 | 12 | ## Options 13 | 14 | ```js 15 | back: undefined // Callback before the backward action. 16 | block: false // Block the next step if the current is invalid. 17 | description: false // Choose if the descriptions of the titles will be showed. 18 | duration: 0 // Duration of the transition between steps in ms. 19 | enter: true // Enables the enter key to change to the next step. 20 | errorImage: false // If an error occurs, a image is showed in the title of the corresponding step. 21 | finish: undefined // Callback before the finish action. 22 | finishButto: true // Include the button with class called '.finish' into the last step. 23 | header: true // Creates a header with title and description. 24 | ignore: '' // Choose the fields to be ignored on validation. 25 | legend: false // Choose if the legends of the steps will be showed. 26 | next: undefined // Callback before the forward action. 27 | select: undefined // Callback executed when the step is shown. 28 | titleClick: true // Active the back and next action in the titles. 29 | titleTarget: undefined // Choose the place where titles will be placed. 30 | transition: 'hide' // Use transition between steps ('hide', 'fade' or 'slide'). 31 | validate: undefined // Callback to each field of each step. 32 | ``` 33 | 34 | ## Usage 35 | 36 | ```html 37 |
38 |
39 | description one 40 | 41 | 42 |
43 | 44 |
45 | description two 46 | 47 | 48 |
49 | 50 | back 51 | next 52 | 53 |
54 | ``` 55 | 56 | ```js 57 | $('form').stepy(); 58 | ``` 59 | 60 | ## Functions 61 | 62 | ```js 63 | $('form').stepy('step', 2); // Changes the form to the second step. 64 | 65 | $('form').stepy('destroy'); // Destroy the Stepy's bind and gives you the raw element. 66 | ``` 67 | 68 | ## Contributors 69 | 70 | [Check it out](http://github.com/wbotelhos/stepy/graphs/contributors) 71 | 72 | ## Love it! 73 | 74 | Via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X8HEP2878NDEG&item_name=stepy) or [Support](https://liberapay.com/wbotelhos). Thanks! (: 75 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # jQuery Stepy - A Wizard Plugin 2 | 3 | ### Next Release 4 | 5 | ### News 6 | 7 | - Added option `backButton` to find the back button; 8 | - Added option `finishButton` to find the finish button; 9 | - Added option `header` to choose if header will be created or not; 10 | - Added option `legendClass` to choose the legend class name; 11 | - Added option `nextButton` to find the next button. 12 | - Added option `stepClass` to choose the step class name; 13 | 14 | #### Changes 15 | 16 | - Class `button-back` was renamed to `stepy-back`; 17 | - Class `button-next` was renamed to `stepy-next`; 18 | - The finish button now is mandatory to a class; 19 | - The finish button is no more moved from its original place; 20 | - The `stepy-navigator` is no more created. Buttons is appended on step; 21 | - The `backLabel` and `nextLabel` were dropped, since button now is by you; 22 | - The `backButton` and `nextButton` now can be located anywhere inside the wrapper; 23 | - The `slide` `transition` now is moved between left and right and was improved; 24 | - The `fieldset` element is no more required, use the class from `stepClass`; 25 | - The `legend` element is no more required, use the class `stepy-legend`; 26 | - The jQuery Validation dependency was dropped; 27 | - The `validate` option now is a callback where you can validate each field of each step. 28 | 29 | ### 1.2.0 30 | 31 | #### News 32 | 33 | + Option `enter` was extracted to choose if the enter key will trigger the step change; 34 | + Added function `destroy` to rollback to original object before the bind; 35 | + Option `back`, `select` and `next` now receives `stepTotal` indicating the total of steps. 36 | 37 | #### Changes 38 | 39 | + The container that holds the navigation buttons now has the class 'stepy-buttons'; 40 | + The error container class was renamed to plural 'stepy-errors'; 41 | + Forms without ID will receives a genarated hash to be used as hook; 42 | + The 'stepy-titles' class was renamed to 'stepy-header'; 43 | + The 'stepy-{id}-titles' ID was renamed to 'stepy-{id || hash}-header'; 44 | + The 'step' class was renamed to 'stepy-step'; 45 | + The '{id}-titles-{index}' was renamed to '{id}-head-{index}'; 46 | + All callbacks now receives the variable `this` as DOM element instead jQuery; 47 | + The 'current-step' class was renamed to 'stepy-active'; 48 | + The finish button now should to have the class 'stepy-finish' instead just 'finish'; 49 | + If you have a submit type button, then you don't need to set the class 'stepy-finish'. 50 | 51 | #### Fixes 52 | 53 | + Fields inside elements was not working the enter action. 54 | 55 | ### 1.1.0 56 | 57 | + Added 'ignore' option to choose the fields to be ignored on validation: 58 | - It must be blank '' to override jQuery Validation 1.9.0 default value and avoid error; 59 | - I hope my fix be accepted, then this option may be used freely; 60 | - But, you never can use ':hidden' as the do, because Wizards needs to validate hidden steps/fields. (; 61 | + Fixed the index number given to Stepy binded by class without id. 62 | 63 | ### 1.0.0 64 | 65 | + Now we using the best pratice to build the plugin; 66 | + Now the plugin is under test with Jasmine and Jasmine jQuery; 67 | + Now public functions is on context scope instead on $.fn; 68 | + Added support to validation to the function .stepy('step', number); 69 | + Added the 'select' callback to execute action when a step is displayed; (by Daniel Hoelbling) 70 | + Fixed the several invocation of select step on each validation; 71 | + Fixed validation to disabled fields do not validate; 72 | + Fixed validations when jQuery Validation returns undefined and blocks; (by Rafael Machado) 73 | + Better look of documentations using markdown. (by Almir Mendes) 74 | 75 | ### 0.5.1 76 | 77 | + Fixed the focus of the first error field (reported by luckyong); 78 | + Avoided highlight only the first field when has multiple invalids fields on the form. 79 | 80 | ### 0.5.0 81 | 82 | + Added the 'titleTarget' attribute to choose the place where titles will be placed; 83 | + Added the 'legend' attribute to choose if the legends of the steps will be showed; 84 | + Added the 'description' attribute to choose if the descriptions of the titles will be showed; 85 | + Added the 'finish' callback attribute that enables action before finish the steps; 86 | + Fixed the possible bug when the ID has more than one word or has number; 87 | + Fixed the possible bug when the ID has more than one word or has number; 88 | + Fixed: avoided the validation of the lastest step when the validation is not enabled; 89 | + Fixed: when there is only one step, the finish button does not appear; (reported by DevPHP) 90 | + The 'onBack' attribute was named just to 'back'; 91 | + The 'onNext' attribute was named just to 'next'; 92 | + The 'finish' attribute was named to 'finishButton'; 93 | + The 'back' and 'next' callback no longer has a default function; 94 | + The finish button is now required for any kind of step if that option is enabled; 95 | + Keeped the options as data called 'options' in the wrapper element to future usages. 96 | 97 | ### 0.4.1 98 | 99 | + Fixed: the validation highlighted only the first field. (fixed by legigor) 100 | 101 | ### 0.4.0 102 | 103 | + Now the enter key goes to next step and just validate the currrent one; (reported by hennaTheGreat) 104 | + Public functions now supports actions by class; (reported by hennaTheGreat) 105 | + Public functions without specify ID or class is no longer supported; 106 | + Now when you to press the enter key into any text field, the form will go to next step; 107 | + Fixed: when the stepy has only one step the next button is not applied; 108 | + Fixed the title click when the number is higher than 10; (reported by neha1312) 109 | + Added ID to the set of titles to be possible to move the titles; 110 | + Added class to buttons container to simplify styling. (fixed by andreyfedoseev) 111 | 112 | ### 0.3.0 113 | 114 | + Added the 'onBack' attribute that enables action before the backward transition; 115 | + Added the 'onNext' attribute that enables action before the forward transition; 116 | 117 | ### 0.2.0 118 | 119 | + Added the 'block' attribute that blocks the next step if the current is invalid; 120 | + Added the 'errorImage' attribute that show a imagem in the title of the corresponding step if an error occur; 121 | + Now you can pass a optionally ID to be the target of the public function's actions; 122 | + All the code was refactored and improved. 123 | 124 | ### 0.1 125 | 126 | + Added a backLabel and nextLabel parameter to specify the labels of the corresponding buttons; 127 | + Added click on the title and description to go to the corresponding step; 128 | + Added a public function 'step' that is possible choose which step to go; 129 | + Added auto-focus in the first field of each step when it is the current; 130 | + Added the parameter includeFinish to format and embed the button with class named ".finish" to the last step; 131 | + Added function that automatically takes the title of the fieldset and become it as title of each step; 132 | + Now is possible to use more than one wizard on the same page; 133 | + Created default options; 134 | + Changed the function bind to newest live; 135 | + The links with # were changed to javascript:void(0) to prevent the page go up; 136 | + Changed to HTML code the special characters; 137 | + Removed the container tha was wrapped the fieldsets and added the actions directly on it; 138 | + Removed unused arguments form binds functions; 139 | + Changed the selectors for the same current element $(this); 140 | + Changed the extends to a defaults developers plugins; 141 | + Keys were placed on single line blocks to avoid error on IE; 142 | + Changed the styles name with a hifen style; 143 | -------------------------------------------------------------------------------- /demo/css/application.css: -------------------------------------------------------------------------------- 1 | @import url('normalize.css'); 2 | @import url('common.css'); 3 | @import url('pygments.css'); 4 | @import url('font-awesome.css'); 5 | @import url('demo.css'); 6 | @import url('stepy.demo.css'); 7 | -------------------------------------------------------------------------------- /demo/css/common.css: -------------------------------------------------------------------------------- 1 | /* commons */ 2 | a { color: #277DA8; text-decoration: none } 3 | a:hover { color: #48A5D4 } 4 | 5 | body { background-color: #E7E7E7; font: normal 10px/1.6 'Helvetica Neue', 'Lucida Grande', Helvetica, Arial, sans-serif } 6 | 7 | footer { font-size: 1.3em; margin: 0 auto; overflow: auto; padding-bottom: 15px; padding-top: 10px; text-align: center; width: 1100px } 8 | 9 | h2 { border-bottom: 1px solid #DEDEDE; clear: right; color: #444; font-size: 2.6em; letter-spacing: .5px; line-height: 1.3em; padding-bottom: 3px } 10 | h2 a { color: #444 } 11 | 12 | h3 { color: #777; font-size: 1.8em; letter-spacing: .4px; margin-bottom: 0 } 13 | h3 a { color: #666 } 14 | 15 | ul { margin-left: 0; padding-left: 22px } 16 | ul li { font-size: 1.3em } 17 | 18 | /* pygments */ 19 | blockquote { border-radius: 4px; margin-left: 0; padding-left: 22px } 20 | blockquote p { font-size: 1.3em !important; padding-left: 10px; padding-top: 5px } 21 | code { background-color: #F8F8F8; border: 1px solid #EAEAEA; border-radius: 3px; margin: 0 2px; padding: 1px 5px; white-space: nowrap } 22 | pre { background-color: #F8F8F8; border: 1px solid #EAEAEA; border-radius: 3px; color: #393939; font-family: menlo, monospace, serif; font-size: 1.3em; padding: 10px 10px; text-shadow: none } 23 | 24 | /* wrapper */ 25 | #wrapper { margin: 0 auto; width: 87% } 26 | #wrapper #container { margin-bottom: 30px; width: 100% } 27 | 28 | /* content */ 29 | #wrapper > p { font-size: 1.5em } 30 | 31 | .option div { color: #444; font: bold 1.4em verdana; margin-top: 12px; letter-spacing: .7px } 32 | .option div span { color: #888; font: 1em arial } 33 | .option p { color: #444; font-size: 1.2em; letter-spacing: .4px; margin-top: 5px; text-align: left } 34 | 35 | .function p { color: #444; font-size: 1.2em; letter-spacing: .4px; margin-left: 3px; margin-top: -8px; text-align: left } 36 | 37 | .demo { margin-bottom: 10px } 38 | 39 | .highlight { clear: both } 40 | 41 | /* top */ 42 | header { height: 160px } 43 | header #logo { display: inline-block } 44 | header #logo h1 { line-height: 2em; margin-bottom: 0; margin-top: 18px } 45 | header #logo h1 a { color: #3B3B3B; font-size: 3em; letter-spacing: -3px; line-height: 1em; text-shadow: 2px 2px #FFF } 46 | header #logo h1 a:hover { color: #000 } 47 | header #logo p { color: #999; font-size: 1.7em; font-weight: bold; margin-left: 10px; margin-top: 10px; text-shadow: 1px 1px 1px #FFF } 48 | 49 | header nav { float: right; margin-top: 20px } 50 | header nav li { display: inline-block; padding: 0 7px 14px; text-align: center; width: 105px } 51 | header nav li a { background-color: #D7D7D7; border-radius: 4px; color: #333; display: block; font: 15px helvetica; letter-spacing: .4px; padding: 5px 0 2px 6px } 52 | header nav li a:hover { background-color: #BBB; color: #333 } 53 | header nav li a i { font-size: 1.5em; left: -20px; position: relative; top: 3px } 54 | 55 | header nav li a.download { background-color: #E7D785 } 56 | header nav li a.download:hover { background-color: #E3D070 } 57 | 58 | /* footer */ 59 | .author { background-color: #FDFDFD; border-bottom: 1px solid #F1F1F1; border-radius: 5px; border-top: 1px solid #F1F1F1; height: auto; margin: 50px auto 0; overflow: auto; padding: 10px; width: 75%; vertical-align: middle } 60 | .author img { background-color: #EEE; display: inline-block; height: 80px; width: 80px; vertical-align: middle } 61 | .author .biography { color: #555; display: inline-block; font-size: 1.2em; letter-spacing: .3px; margin-top: 2px; padding-left: 7px; padding-right: 7px; width: calc(98% - 80px - 7px - 7px - 6px); vertical-align: middle } 62 | .author .biography p { margin: 0 } 63 | .author .social { display: inline-block; width: 2%; vertical-align: middle } 64 | .author .social a { background-color: #EEE; background-repeat: no-repeat; border-radius: 3px; display: block; height: 16px; margin-bottom: 5px; width: 16px } 65 | .author .social a:last-child { margin-bottom: 0 } 66 | .author .social a.facebook { background-color: #eee } 67 | .author .social a.github { background-color: #eee } 68 | .author .social a.linkedin { background-color: #eee } 69 | .author .social a.twitter { background-color: #eee } 70 | -------------------------------------------------------------------------------- /demo/css/demo.css: -------------------------------------------------------------------------------- 1 | ul li { font-size: inherit !important } 2 | 3 | .demo form label[for="agree"] { display: inline; margin-right: 5px; vertical-align: middle } 4 | .demo form input[type="checkbox"] { height: 18px; margin-bottom: 0; width: 18px; vertical-align: middle } 5 | 6 | .demo form .skills { margin-bottom: 25px } 7 | .demo form .skills label { display: inline; margin-right: 25px; vertical-align: middle } 8 | .demo form .skills input { height: 18px; margin-bottom: 0; width: 18px; vertical-align: middle } 9 | 10 | .demo #finishButton-demo input[type="submit"] { font-size: 1.5em; height: 45px; margin-top: 10px; width: 645px } 11 | -------------------------------------------------------------------------------- /demo/css/font-awesome.css: -------------------------------------------------------------------------------- 1 | /* Font Awesome 2 | the iconic font designed for use with Twitter Bootstrap 3 | ------------------------------------------------------- 4 | The full suite of pictographic icons, examples, and documentation 5 | can be found at: http://fortawesome.github.com/Font-Awesome/ 6 | 7 | License 8 | ------------------------------------------------------- 9 | The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: 10 | http://creativecommons.org/licenses/by/3.0/ A mention of 11 | 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable 12 | source code is considered acceptable attribution (most common on the web). 13 | If human readable source code is not available to the end user, a mention in 14 | an 'About' or 'Credits' screen is considered acceptable (most common in desktop 15 | or mobile software). 16 | 17 | Contact 18 | ------------------------------------------------------- 19 | Email: dave@davegandy.com 20 | Twitter: http://twitter.com/fortaweso_me 21 | Work: Lead Product Designer @ http://kyruus.com 22 | 23 | */ 24 | @font-face { 25 | font-family: 'FontAwesome'; 26 | src: url('../font/fontawesome-webfont.ttf') format('truetype'); 27 | font-weight: normal; 28 | font-style: normal; 29 | } 30 | /* Font Awesome styles 31 | ------------------------------------------------------- */ 32 | [class^="icon-"]:before, 33 | [class*=" icon-"]:before { 34 | font-family: FontAwesome; 35 | font-weight: normal; 36 | font-style: normal; 37 | display: inline-block; 38 | text-decoration: inherit; 39 | } 40 | a [class^="icon-"], 41 | a [class*=" icon-"] { 42 | display: inline-block; 43 | text-decoration: inherit; 44 | } 45 | /* makes the font 33% larger relative to the icon container */ 46 | .icon-large:before { 47 | vertical-align: middle; 48 | font-size: 1.3333333333333333em; 49 | } 50 | .btn [class^="icon-"], 51 | .nav-tabs [class^="icon-"], 52 | .btn [class*=" icon-"], 53 | .nav-tabs [class*=" icon-"] { 54 | /* keeps button heights with and without icons the same */ 55 | 56 | line-height: .9em; 57 | } 58 | li [class^="icon-"], 59 | li [class*=" icon-"] { 60 | display: inline-block; 61 | width: 1.25em; 62 | text-align: center; 63 | } 64 | li .icon-large:before, 65 | li .icon-large:before { 66 | /* 1.5 increased font size for icon-large * 1.25 width */ 67 | 68 | width: 1.875em; 69 | } 70 | ul.icons { 71 | list-style-type: none; 72 | margin-left: 2em; 73 | text-indent: -0.8em; 74 | } 75 | ul.icons li [class^="icon-"], 76 | ul.icons li [class*=" icon-"] { 77 | width: .8em; 78 | } 79 | ul.icons li .icon-large:before, 80 | ul.icons li .icon-large:before { 81 | /* 1.5 increased font size for icon-large * 1.25 width */ 82 | 83 | vertical-align: initial; 84 | } 85 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen 86 | readers do not read off random characters that represent icons */ 87 | .icon-glass:before { 88 | content: "\f000"; 89 | } 90 | .icon-music:before { 91 | content: "\f001"; 92 | } 93 | .icon-search:before { 94 | content: "\f002"; 95 | } 96 | .icon-envelope:before { 97 | content: "\f003"; 98 | } 99 | .icon-heart:before { 100 | content: "\f004"; 101 | } 102 | .icon-star:before { 103 | content: "\f005"; 104 | } 105 | .icon-star-empty:before { 106 | content: "\f006"; 107 | } 108 | .icon-user:before { 109 | content: "\f007"; 110 | } 111 | .icon-film:before { 112 | content: "\f008"; 113 | } 114 | .icon-th-large:before { 115 | content: "\f009"; 116 | } 117 | .icon-th:before { 118 | content: "\f00a"; 119 | } 120 | .icon-th-list:before { 121 | content: "\f00b"; 122 | } 123 | .icon-ok:before { 124 | content: "\f00c"; 125 | } 126 | .icon-remove:before { 127 | content: "\f00d"; 128 | } 129 | .icon-zoom-in:before { 130 | content: "\f00e"; 131 | } 132 | .icon-zoom-out:before { 133 | content: "\f010"; 134 | } 135 | .icon-off:before { 136 | content: "\f011"; 137 | } 138 | .icon-signal:before { 139 | content: "\f012"; 140 | } 141 | .icon-cog:before { 142 | content: "\f013"; 143 | } 144 | .icon-trash:before { 145 | content: "\f014"; 146 | } 147 | .icon-home:before { 148 | content: "\f015"; 149 | } 150 | .icon-file:before { 151 | content: "\f016"; 152 | } 153 | .icon-time:before { 154 | content: "\f017"; 155 | } 156 | .icon-road:before { 157 | content: "\f018"; 158 | } 159 | .icon-download-alt:before { 160 | content: "\f019"; 161 | } 162 | .icon-download:before { 163 | content: "\f01a"; 164 | } 165 | .icon-upload:before { 166 | content: "\f01b"; 167 | } 168 | .icon-inbox:before { 169 | content: "\f01c"; 170 | } 171 | .icon-play-circle:before { 172 | content: "\f01d"; 173 | } 174 | .icon-repeat:before { 175 | content: "\f01e"; 176 | } 177 | /* \f020 is not a valid unicode character. all shifted one down */ 178 | .icon-refresh:before { 179 | content: "\f021"; 180 | } 181 | .icon-list-alt:before { 182 | content: "\f022"; 183 | } 184 | .icon-lock:before { 185 | content: "\f023"; 186 | } 187 | .icon-flag:before { 188 | content: "\f024"; 189 | } 190 | .icon-headphones:before { 191 | content: "\f025"; 192 | } 193 | .icon-volume-off:before { 194 | content: "\f026"; 195 | } 196 | .icon-volume-down:before { 197 | content: "\f027"; 198 | } 199 | .icon-volume-up:before { 200 | content: "\f028"; 201 | } 202 | .icon-qrcode:before { 203 | content: "\f029"; 204 | } 205 | .icon-barcode:before { 206 | content: "\f02a"; 207 | } 208 | .icon-tag:before { 209 | content: "\f02b"; 210 | } 211 | .icon-tags:before { 212 | content: "\f02c"; 213 | } 214 | .icon-book:before { 215 | content: "\f02d"; 216 | } 217 | .icon-bookmark:before { 218 | content: "\f02e"; 219 | } 220 | .icon-print:before { 221 | content: "\f02f"; 222 | } 223 | .icon-camera:before { 224 | content: "\f030"; 225 | } 226 | .icon-font:before { 227 | content: "\f031"; 228 | } 229 | .icon-bold:before { 230 | content: "\f032"; 231 | } 232 | .icon-italic:before { 233 | content: "\f033"; 234 | } 235 | .icon-text-height:before { 236 | content: "\f034"; 237 | } 238 | .icon-text-width:before { 239 | content: "\f035"; 240 | } 241 | .icon-align-left:before { 242 | content: "\f036"; 243 | } 244 | .icon-align-center:before { 245 | content: "\f037"; 246 | } 247 | .icon-align-right:before { 248 | content: "\f038"; 249 | } 250 | .icon-align-justify:before { 251 | content: "\f039"; 252 | } 253 | .icon-list:before { 254 | content: "\f03a"; 255 | } 256 | .icon-indent-left:before { 257 | content: "\f03b"; 258 | } 259 | .icon-indent-right:before { 260 | content: "\f03c"; 261 | } 262 | .icon-facetime-video:before { 263 | content: "\f03d"; 264 | } 265 | .icon-picture:before { 266 | content: "\f03e"; 267 | } 268 | .icon-pencil:before { 269 | content: "\f040"; 270 | } 271 | .icon-map-marker:before { 272 | content: "\f041"; 273 | } 274 | .icon-adjust:before { 275 | content: "\f042"; 276 | } 277 | .icon-tint:before { 278 | content: "\f043"; 279 | } 280 | .icon-edit:before { 281 | content: "\f044"; 282 | } 283 | .icon-share:before { 284 | content: "\f045"; 285 | } 286 | .icon-check:before { 287 | content: "\f046"; 288 | } 289 | .icon-move:before { 290 | content: "\f047"; 291 | } 292 | .icon-step-backward:before { 293 | content: "\f048"; 294 | } 295 | .icon-fast-backward:before { 296 | content: "\f049"; 297 | } 298 | .icon-backward:before { 299 | content: "\f04a"; 300 | } 301 | .icon-play:before { 302 | content: "\f04b"; 303 | } 304 | .icon-pause:before { 305 | content: "\f04c"; 306 | } 307 | .icon-stop:before { 308 | content: "\f04d"; 309 | } 310 | .icon-forward:before { 311 | content: "\f04e"; 312 | } 313 | .icon-fast-forward:before { 314 | content: "\f050"; 315 | } 316 | .icon-step-forward:before { 317 | content: "\f051"; 318 | } 319 | .icon-eject:before { 320 | content: "\f052"; 321 | } 322 | .icon-chevron-left:before { 323 | content: "\f053"; 324 | } 325 | .icon-chevron-right:before { 326 | content: "\f054"; 327 | } 328 | .icon-plus-sign:before { 329 | content: "\f055"; 330 | } 331 | .icon-minus-sign:before { 332 | content: "\f056"; 333 | } 334 | .icon-remove-sign:before { 335 | content: "\f057"; 336 | } 337 | .icon-ok-sign:before { 338 | content: "\f058"; 339 | } 340 | .icon-question-sign:before { 341 | content: "\f059"; 342 | } 343 | .icon-info-sign:before { 344 | content: "\f05a"; 345 | } 346 | .icon-screenshot:before { 347 | content: "\f05b"; 348 | } 349 | .icon-remove-circle:before { 350 | content: "\f05c"; 351 | } 352 | .icon-ok-circle:before { 353 | content: "\f05d"; 354 | } 355 | .icon-ban-circle:before { 356 | content: "\f05e"; 357 | } 358 | .icon-arrow-left:before { 359 | content: "\f060"; 360 | } 361 | .icon-arrow-right:before { 362 | content: "\f061"; 363 | } 364 | .icon-arrow-up:before { 365 | content: "\f062"; 366 | } 367 | .icon-arrow-down:before { 368 | content: "\f063"; 369 | } 370 | .icon-share-alt:before { 371 | content: "\f064"; 372 | } 373 | .icon-resize-full:before { 374 | content: "\f065"; 375 | } 376 | .icon-resize-small:before { 377 | content: "\f066"; 378 | } 379 | .icon-plus:before { 380 | content: "\f067"; 381 | } 382 | .icon-minus:before { 383 | content: "\f068"; 384 | } 385 | .icon-asterisk:before { 386 | content: "\f069"; 387 | } 388 | .icon-exclamation-sign:before { 389 | content: "\f06a"; 390 | } 391 | .icon-gift:before { 392 | content: "\f06b"; 393 | } 394 | .icon-leaf:before { 395 | content: "\f06c"; 396 | } 397 | .icon-fire:before { 398 | content: "\f06d"; 399 | } 400 | .icon-eye-open:before { 401 | content: "\f06e"; 402 | } 403 | .icon-eye-close:before { 404 | content: "\f070"; 405 | } 406 | .icon-warning-sign:before { 407 | content: "\f071"; 408 | } 409 | .icon-plane:before { 410 | content: "\f072"; 411 | } 412 | .icon-calendar:before { 413 | content: "\f073"; 414 | } 415 | .icon-random:before { 416 | content: "\f074"; 417 | } 418 | .icon-comment:before { 419 | content: "\f075"; 420 | } 421 | .icon-magnet:before { 422 | content: "\f076"; 423 | } 424 | .icon-chevron-up:before { 425 | content: "\f077"; 426 | } 427 | .icon-chevron-down:before { 428 | content: "\f078"; 429 | } 430 | .icon-retweet:before { 431 | content: "\f079"; 432 | } 433 | .icon-shopping-cart:before { 434 | content: "\f07a"; 435 | } 436 | .icon-folder-close:before { 437 | content: "\f07b"; 438 | } 439 | .icon-folder-open:before { 440 | content: "\f07c"; 441 | } 442 | .icon-resize-vertical:before { 443 | content: "\f07d"; 444 | } 445 | .icon-resize-horizontal:before { 446 | content: "\f07e"; 447 | } 448 | .icon-bar-chart:before { 449 | content: "\f080"; 450 | } 451 | .icon-twitter-sign:before { 452 | content: "\f081"; 453 | } 454 | .icon-facebook-sign:before { 455 | content: "\f082"; 456 | } 457 | .icon-camera-retro:before { 458 | content: "\f083"; 459 | } 460 | .icon-key:before { 461 | content: "\f084"; 462 | } 463 | .icon-cogs:before { 464 | content: "\f085"; 465 | } 466 | .icon-comments:before { 467 | content: "\f086"; 468 | } 469 | .icon-thumbs-up:before { 470 | content: "\f087"; 471 | } 472 | .icon-thumbs-down:before { 473 | content: "\f088"; 474 | } 475 | .icon-star-half:before { 476 | content: "\f089"; 477 | } 478 | .icon-heart-empty:before { 479 | content: "\f08a"; 480 | } 481 | .icon-signout:before { 482 | content: "\f08b"; 483 | } 484 | .icon-linkedin-sign:before { 485 | content: "\f08c"; 486 | } 487 | .icon-pushpin:before { 488 | content: "\f08d"; 489 | } 490 | .icon-external-link:before { 491 | content: "\f08e"; 492 | } 493 | .icon-signin:before { 494 | content: "\f090"; 495 | } 496 | .icon-trophy:before { 497 | content: "\f091"; 498 | } 499 | .icon-github-sign:before { 500 | content: "\f092"; 501 | } 502 | .icon-upload-alt:before { 503 | content: "\f093"; 504 | } 505 | .icon-lemon:before { 506 | content: "\f094"; 507 | } 508 | .icon-phone:before { 509 | content: "\f095"; 510 | } 511 | .icon-check-empty:before { 512 | content: "\f096"; 513 | } 514 | .icon-bookmark-empty:before { 515 | content: "\f097"; 516 | } 517 | .icon-phone-sign:before { 518 | content: "\f098"; 519 | } 520 | .icon-twitter:before { 521 | content: "\f099"; 522 | } 523 | .icon-facebook:before { 524 | content: "\f09a"; 525 | } 526 | .icon-github:before { 527 | content: "\f09b"; 528 | } 529 | .icon-unlock:before { 530 | content: "\f09c"; 531 | } 532 | .icon-credit-card:before { 533 | content: "\f09d"; 534 | } 535 | .icon-rss:before { 536 | content: "\f09e"; 537 | } 538 | .icon-hdd:before { 539 | content: "\f0a0"; 540 | } 541 | .icon-bullhorn:before { 542 | content: "\f0a1"; 543 | } 544 | .icon-bell:before { 545 | content: "\f0a2"; 546 | } 547 | .icon-certificate:before { 548 | content: "\f0a3"; 549 | } 550 | .icon-hand-right:before { 551 | content: "\f0a4"; 552 | } 553 | .icon-hand-left:before { 554 | content: "\f0a5"; 555 | } 556 | .icon-hand-up:before { 557 | content: "\f0a6"; 558 | } 559 | .icon-hand-down:before { 560 | content: "\f0a7"; 561 | } 562 | .icon-circle-arrow-left:before { 563 | content: "\f0a8"; 564 | } 565 | .icon-circle-arrow-right:before { 566 | content: "\f0a9"; 567 | } 568 | .icon-circle-arrow-up:before { 569 | content: "\f0aa"; 570 | } 571 | .icon-circle-arrow-down:before { 572 | content: "\f0ab"; 573 | } 574 | .icon-globe:before { 575 | content: "\f0ac"; 576 | } 577 | .icon-wrench:before { 578 | content: "\f0ad"; 579 | } 580 | .icon-tasks:before { 581 | content: "\f0ae"; 582 | } 583 | .icon-filter:before { 584 | content: "\f0b0"; 585 | } 586 | .icon-briefcase:before { 587 | content: "\f0b1"; 588 | } 589 | .icon-fullscreen:before { 590 | content: "\f0b2"; 591 | } 592 | .icon-group:before { 593 | content: "\f0c0"; 594 | } 595 | .icon-link:before { 596 | content: "\f0c1"; 597 | } 598 | .icon-cloud:before { 599 | content: "\f0c2"; 600 | } 601 | .icon-beaker:before { 602 | content: "\f0c3"; 603 | } 604 | .icon-cut:before { 605 | content: "\f0c4"; 606 | } 607 | .icon-copy:before { 608 | content: "\f0c5"; 609 | } 610 | .icon-paper-clip:before { 611 | content: "\f0c6"; 612 | } 613 | .icon-save:before { 614 | content: "\f0c7"; 615 | } 616 | .icon-sign-blank:before { 617 | content: "\f0c8"; 618 | } 619 | .icon-reorder:before { 620 | content: "\f0c9"; 621 | } 622 | .icon-list-ul:before { 623 | content: "\f0ca"; 624 | } 625 | .icon-list-ol:before { 626 | content: "\f0cb"; 627 | } 628 | .icon-strikethrough:before { 629 | content: "\f0cc"; 630 | } 631 | .icon-underline:before { 632 | content: "\f0cd"; 633 | } 634 | .icon-table:before { 635 | content: "\f0ce"; 636 | } 637 | .icon-table:before { 638 | content: "\f0ce"; 639 | } 640 | .icon-magic:before { 641 | content: "\f0d0"; 642 | } 643 | .icon-truck:before { 644 | content: "\f0d1"; 645 | } 646 | .icon-pinterest:before { 647 | content: "\f0d2"; 648 | } 649 | .icon-pinterest-sign:before { 650 | content: "\f0d3"; 651 | } 652 | .icon-google-plus-sign:before { 653 | content: "\f0d4"; 654 | } 655 | .icon-google-plus:before { 656 | content: "\f0d5"; 657 | } 658 | .icon-money:before { 659 | content: "\f0d6"; 660 | } 661 | .icon-caret-down:before { 662 | content: "\f0d7"; 663 | } 664 | .icon-caret-up:before { 665 | content: "\f0d8"; 666 | } 667 | .icon-caret-left:before { 668 | content: "\f0d9"; 669 | } 670 | .icon-caret-right:before { 671 | content: "\f0da"; 672 | } 673 | .icon-columns:before { 674 | content: "\f0db"; 675 | } 676 | .icon-sort:before { 677 | content: "\f0dc"; 678 | } 679 | .icon-sort-down:before { 680 | content: "\f0dd"; 681 | } 682 | .icon-sort-up:before { 683 | content: "\f0de"; 684 | } 685 | .icon-envelope-alt:before { 686 | content: "\f0e0"; 687 | } 688 | .icon-linkedin:before { 689 | content: "\f0e1"; 690 | } 691 | .icon-undo:before { 692 | content: "\f0e2"; 693 | } 694 | .icon-legal:before { 695 | content: "\f0e3"; 696 | } 697 | .icon-dashboard:before { 698 | content: "\f0e4"; 699 | } 700 | .icon-comment-alt:before { 701 | content: "\f0e5"; 702 | } 703 | .icon-comments-alt:before { 704 | content: "\f0e6"; 705 | } 706 | .icon-bolt:before { 707 | content: "\f0e7"; 708 | } 709 | .icon-sitemap:before { 710 | content: "\f0e8"; 711 | } 712 | .icon-umbrella:before { 713 | content: "\f0e9"; 714 | } 715 | .icon-paste:before { 716 | content: "\f0ea"; 717 | } 718 | .icon-user-md:before { 719 | content: "\f200"; 720 | } 721 | .icon-apple-logo:before { 722 | content: "\f500"; 723 | } 724 | .icon-windows-8:before { 725 | content: "\f501"; 726 | } 727 | .icon-js-fiddle:before { 728 | content: "\f502"; 729 | } 730 | .icon-skype:before { 731 | content: "\f503"; 732 | } 733 | .icon-youtube-sign:before { 734 | content: "\f504"; 735 | } 736 | .icon-youtube:before { 737 | content: "\f505"; 738 | } 739 | .icon-vimeo-sign:before { 740 | content: "\f506"; 741 | } 742 | .icon-vimeo:before { 743 | content: "\f507"; 744 | } 745 | .icon-lastfm-sign:before { 746 | content: "\f508"; 747 | } 748 | .icon-lastfm:before { 749 | content: "\f509"; 750 | } 751 | .icon-rss-sign:before { 752 | content: "\f50a"; 753 | } 754 | .icon-reddit:before { 755 | content: "\f50b"; 756 | } 757 | .icon-delicious-sign:before { 758 | content: "\f50c"; 759 | } 760 | .icon-wordpress-sign:before { 761 | content: "\f50d"; 762 | } 763 | .icon-wordpress:before { 764 | content: "\f50e"; 765 | } 766 | .icon-git-fork:before { 767 | content: "\f50f"; 768 | } 769 | .icon-blogger-sign:before { 770 | content: "\f510"; 771 | } 772 | .icon-blogger:before { 773 | content: "\f511"; 774 | } 775 | .icon-tumblr-sign:before { 776 | content: "\f512"; 777 | } 778 | .icon-tumblr:before { 779 | content: "\f513"; 780 | } 781 | .icon-flickr-sign:before { 782 | content: "\f514"; 783 | } 784 | .icon-flickr:before { 785 | content: "\f515"; 786 | } 787 | .icon-picasa-sign:before { 788 | content: "\f516"; 789 | } 790 | .icon-picasa:before { 791 | content: "\f517"; 792 | } 793 | .icon-amazon-sign:before { 794 | content: "\f518"; 795 | } 796 | .icon-amazon:before { 797 | content: "\f519"; 798 | } 799 | .icon-yelp-sign:before { 800 | content: "\f51a"; 801 | } 802 | .icon-yelp:before { 803 | content: "\f51b"; 804 | } 805 | .icon-soundcloud:before { 806 | content: "\f51c"; 807 | } 808 | .icon-spotify:before { 809 | content: "\f51d"; 810 | } 811 | .icon-yahoo-sign:before { 812 | content: "\f520"; 813 | } 814 | .icon-yahoo:before { 815 | content: "\f521"; 816 | } 817 | .icon-evernote-sign:before { 818 | content: "\f522"; 819 | } 820 | .icon-evernote:before { 821 | content: "\f523"; 822 | } 823 | .icon-google-sign:before { 824 | content: "\f524"; 825 | } 826 | .icon-google:before { 827 | content: "\f525"; 828 | } 829 | .icon-hacker-news:before { 830 | content: "\f526"; 831 | } 832 | .icon-map:before { 833 | content: "\f529"; 834 | } 835 | .icon-bus-sign:before { 836 | content: "\f52a"; 837 | } 838 | .icon-bike-sign:before { 839 | content: "\f52b"; 840 | } 841 | .icon-car-sign:before { 842 | content: "\f52c"; 843 | } 844 | .icon-taxi-sign:before { 845 | content: "\f52d"; 846 | } 847 | .icon-truck-sign:before { 848 | content: "\f52e"; 849 | } 850 | .icon-handicap-sign:before { 851 | content: "\f52f"; 852 | } 853 | -------------------------------------------------------------------------------- /demo/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in 9 | * IE on Windows Phone and in iOS. 10 | */ 11 | 12 | html { 13 | line-height: 1.15; /* 1 */ 14 | -ms-text-size-adjust: 100%; /* 2 */ 15 | -webkit-text-size-adjust: 100%; /* 2 */ 16 | } 17 | 18 | /* Sections 19 | ========================================================================== */ 20 | 21 | /** 22 | * Remove the margin in all browsers (opinionated). 23 | */ 24 | 25 | body { 26 | margin: 0; 27 | } 28 | 29 | /** 30 | * Add the correct display in IE 9-. 31 | */ 32 | 33 | article, 34 | aside, 35 | footer, 36 | header, 37 | nav, 38 | section { 39 | display: block; 40 | } 41 | 42 | /** 43 | * Correct the font size and margin on `h1` elements within `section` and 44 | * `article` contexts in Chrome, Firefox, and Safari. 45 | */ 46 | 47 | h1 { 48 | font-size: 2em; 49 | margin: 0.67em 0; 50 | } 51 | 52 | /* Grouping content 53 | ========================================================================== */ 54 | 55 | /** 56 | * Add the correct display in IE 9-. 57 | * 1. Add the correct display in IE. 58 | */ 59 | 60 | figcaption, 61 | figure, 62 | main { /* 1 */ 63 | display: block; 64 | } 65 | 66 | /** 67 | * Add the correct margin in IE 8. 68 | */ 69 | 70 | figure { 71 | margin: 1em 40px; 72 | } 73 | 74 | /** 75 | * 1. Add the correct box sizing in Firefox. 76 | * 2. Show the overflow in Edge and IE. 77 | */ 78 | 79 | hr { 80 | box-sizing: content-box; /* 1 */ 81 | height: 0; /* 1 */ 82 | overflow: visible; /* 2 */ 83 | } 84 | 85 | /** 86 | * 1. Correct the inheritance and scaling of font size in all browsers. 87 | * 2. Correct the odd `em` font sizing in all browsers. 88 | */ 89 | 90 | pre { 91 | font-family: monospace, monospace; /* 1 */ 92 | font-size: 1em; /* 2 */ 93 | } 94 | 95 | /* Text-level semantics 96 | ========================================================================== */ 97 | 98 | /** 99 | * 1. Remove the gray background on active links in IE 10. 100 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 101 | */ 102 | 103 | a { 104 | background-color: transparent; /* 1 */ 105 | -webkit-text-decoration-skip: objects; /* 2 */ 106 | } 107 | 108 | /** 109 | * 1. Remove the bottom border in Chrome 57- and Firefox 39-. 110 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 111 | */ 112 | 113 | abbr[title] { 114 | border-bottom: none; /* 1 */ 115 | text-decoration: underline; /* 2 */ 116 | text-decoration: underline dotted; /* 2 */ 117 | } 118 | 119 | /** 120 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 121 | */ 122 | 123 | b, 124 | strong { 125 | font-weight: inherit; 126 | } 127 | 128 | /** 129 | * Add the correct font weight in Chrome, Edge, and Safari. 130 | */ 131 | 132 | b, 133 | strong { 134 | font-weight: bolder; 135 | } 136 | 137 | /** 138 | * 1. Correct the inheritance and scaling of font size in all browsers. 139 | * 2. Correct the odd `em` font sizing in all browsers. 140 | */ 141 | 142 | code, 143 | kbd, 144 | samp { 145 | font-family: monospace, monospace; /* 1 */ 146 | font-size: 1em; /* 2 */ 147 | } 148 | 149 | /** 150 | * Add the correct font style in Android 4.3-. 151 | */ 152 | 153 | dfn { 154 | font-style: italic; 155 | } 156 | 157 | /** 158 | * Add the correct background and color in IE 9-. 159 | */ 160 | 161 | mark { 162 | background-color: #ff0; 163 | color: #000; 164 | } 165 | 166 | /** 167 | * Add the correct font size in all browsers. 168 | */ 169 | 170 | small { 171 | font-size: 80%; 172 | } 173 | 174 | /** 175 | * Prevent `sub` and `sup` elements from affecting the line height in 176 | * all browsers. 177 | */ 178 | 179 | sub, 180 | sup { 181 | font-size: 75%; 182 | line-height: 0; 183 | position: relative; 184 | vertical-align: baseline; 185 | } 186 | 187 | sub { 188 | bottom: -0.25em; 189 | } 190 | 191 | sup { 192 | top: -0.5em; 193 | } 194 | 195 | /* Embedded content 196 | ========================================================================== */ 197 | 198 | /** 199 | * Add the correct display in IE 9-. 200 | */ 201 | 202 | audio, 203 | video { 204 | display: inline-block; 205 | } 206 | 207 | /** 208 | * Add the correct display in iOS 4-7. 209 | */ 210 | 211 | audio:not([controls]) { 212 | display: none; 213 | height: 0; 214 | } 215 | 216 | /** 217 | * Remove the border on images inside links in IE 10-. 218 | */ 219 | 220 | img { 221 | border-style: none; 222 | } 223 | 224 | /** 225 | * Hide the overflow in IE. 226 | */ 227 | 228 | svg:not(:root) { 229 | overflow: hidden; 230 | } 231 | 232 | /* Forms 233 | ========================================================================== */ 234 | 235 | /** 236 | * 1. Change the font styles in all browsers (opinionated). 237 | * 2. Remove the margin in Firefox and Safari. 238 | */ 239 | 240 | button, 241 | input, 242 | optgroup, 243 | select, 244 | textarea { 245 | font-family: sans-serif; /* 1 */ 246 | font-size: 100%; /* 1 */ 247 | line-height: 1.15; /* 1 */ 248 | margin: 0; /* 2 */ 249 | } 250 | 251 | /** 252 | * Show the overflow in IE. 253 | * 1. Show the overflow in Edge. 254 | */ 255 | 256 | button, 257 | input { /* 1 */ 258 | overflow: visible; 259 | } 260 | 261 | /** 262 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 263 | * 1. Remove the inheritance of text transform in Firefox. 264 | */ 265 | 266 | button, 267 | select { /* 1 */ 268 | text-transform: none; 269 | } 270 | 271 | /** 272 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 273 | * controls in Android 4. 274 | * 2. Correct the inability to style clickable types in iOS and Safari. 275 | */ 276 | 277 | button, 278 | html [type="button"], /* 1 */ 279 | [type="reset"], 280 | [type="submit"] { 281 | -webkit-appearance: button; /* 2 */ 282 | } 283 | 284 | /** 285 | * Remove the inner border and padding in Firefox. 286 | */ 287 | 288 | button::-moz-focus-inner, 289 | [type="button"]::-moz-focus-inner, 290 | [type="reset"]::-moz-focus-inner, 291 | [type="submit"]::-moz-focus-inner { 292 | border-style: none; 293 | padding: 0; 294 | } 295 | 296 | /** 297 | * Restore the focus styles unset by the previous rule. 298 | */ 299 | 300 | button:-moz-focusring, 301 | [type="button"]:-moz-focusring, 302 | [type="reset"]:-moz-focusring, 303 | [type="submit"]:-moz-focusring { 304 | outline: 1px dotted ButtonText; 305 | } 306 | 307 | /** 308 | * Correct the padding in Firefox. 309 | */ 310 | 311 | fieldset { 312 | padding: 0.35em 0.75em 0.625em; 313 | } 314 | 315 | /** 316 | * 1. Correct the text wrapping in Edge and IE. 317 | * 2. Correct the color inheritance from `fieldset` elements in IE. 318 | * 3. Remove the padding so developers are not caught out when they zero out 319 | * `fieldset` elements in all browsers. 320 | */ 321 | 322 | legend { 323 | box-sizing: border-box; /* 1 */ 324 | color: inherit; /* 2 */ 325 | display: table; /* 1 */ 326 | max-width: 100%; /* 1 */ 327 | padding: 0; /* 3 */ 328 | white-space: normal; /* 1 */ 329 | } 330 | 331 | /** 332 | * 1. Add the correct display in IE 9-. 333 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. 334 | */ 335 | 336 | progress { 337 | display: inline-block; /* 1 */ 338 | vertical-align: baseline; /* 2 */ 339 | } 340 | 341 | /** 342 | * Remove the default vertical scrollbar in IE. 343 | */ 344 | 345 | textarea { 346 | overflow: auto; 347 | } 348 | 349 | /** 350 | * 1. Add the correct box sizing in IE 10-. 351 | * 2. Remove the padding in IE 10-. 352 | */ 353 | 354 | [type="checkbox"], 355 | [type="radio"] { 356 | box-sizing: border-box; /* 1 */ 357 | padding: 0; /* 2 */ 358 | } 359 | 360 | /** 361 | * Correct the cursor style of increment and decrement buttons in Chrome. 362 | */ 363 | 364 | [type="number"]::-webkit-inner-spin-button, 365 | [type="number"]::-webkit-outer-spin-button { 366 | height: auto; 367 | } 368 | 369 | /** 370 | * 1. Correct the odd appearance in Chrome and Safari. 371 | * 2. Correct the outline style in Safari. 372 | */ 373 | 374 | [type="search"] { 375 | -webkit-appearance: textfield; /* 1 */ 376 | outline-offset: -2px; /* 2 */ 377 | } 378 | 379 | /** 380 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. 381 | */ 382 | 383 | [type="search"]::-webkit-search-cancel-button, 384 | [type="search"]::-webkit-search-decoration { 385 | -webkit-appearance: none; 386 | } 387 | 388 | /** 389 | * 1. Correct the inability to style clickable types in iOS and Safari. 390 | * 2. Change font properties to `inherit` in Safari. 391 | */ 392 | 393 | ::-webkit-file-upload-button { 394 | -webkit-appearance: button; /* 1 */ 395 | font: inherit; /* 2 */ 396 | } 397 | 398 | /* Interactive 399 | ========================================================================== */ 400 | 401 | /* 402 | * Add the correct display in IE 9-. 403 | * 1. Add the correct display in Edge, IE, and Firefox. 404 | */ 405 | 406 | details, /* 1 */ 407 | menu { 408 | display: block; 409 | } 410 | 411 | /* 412 | * Add the correct display in all browsers. 413 | */ 414 | 415 | summary { 416 | display: list-item; 417 | } 418 | 419 | /* Scripting 420 | ========================================================================== */ 421 | 422 | /** 423 | * Add the correct display in IE 9-. 424 | */ 425 | 426 | canvas { 427 | display: inline-block; 428 | } 429 | 430 | /** 431 | * Add the correct display in IE. 432 | */ 433 | 434 | template { 435 | display: none; 436 | } 437 | 438 | /* Hidden 439 | ========================================================================== */ 440 | 441 | /** 442 | * Add the correct display in IE 10-. 443 | */ 444 | 445 | [hidden] { 446 | display: none; 447 | } 448 | -------------------------------------------------------------------------------- /demo/css/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .nd { color: #707a7c } /* Name.Decorator */ 2 | .highlight .c1 { color: #228B22 } /* Comment.Single */ 3 | 4 | .highlight .hll { background-color: #ffffcc } 5 | .highlight .c { color: #008800; font-style: italic } /* Comment */ 6 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 7 | .highlight .k { color: #000080; font-weight: bold } /* Keyword */ 8 | .highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #008080 } /* Comment.Preproc */ 10 | .highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ 11 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 14 | .highlight .gh { color: #999999 } /* Generic.Heading */ 15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 16 | .highlight .go { color: #888888 } /* Generic.Output */ 17 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #aaaaaa } /* Generic.Subheading */ 20 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 21 | .highlight .kc { color: #000080; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #000080; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #000080; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #000080; font-weight: bold } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #000080; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #000080; font-weight: bold } /* Keyword.Type */ 27 | .highlight .m { color: #0000FF } /* Literal.Number */ 28 | .highlight .s { color: #0000FF } /* Literal.String */ 29 | .highlight .na { color: #FF0000 } /* Name.Attribute */ 30 | .highlight .nt { color: #000080; font-weight: bold } /* Name.Tag */ 31 | .highlight .ow { font-weight: bold } /* Operator.Word */ 32 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 33 | .highlight .mf { color: #0000FF } /* Literal.Number.Float */ 34 | .highlight .mh { color: #0000FF } /* Literal.Number.Hex */ 35 | .highlight .mi { color: #0000FF } /* Literal.Number.Integer */ 36 | .highlight .mo { color: #0000FF } /* Literal.Number.Oct */ 37 | .highlight .sb { color: #0000FF } /* Literal.String.Backtick */ 38 | .highlight .sc { color: #800080 } /* Literal.String.Char */ 39 | .highlight .sd { color: #0000FF } /* Literal.String.Doc */ 40 | .highlight .s2 { color: #0000FF } /* Literal.String.Double */ 41 | .highlight .se { color: #0000FF } /* Literal.String.Escape */ 42 | .highlight .sh { color: #0000FF } /* Literal.String.Heredoc */ 43 | .highlight .si { color: #0000FF } /* Literal.String.Interpol */ 44 | .highlight .sx { color: #0000FF } /* Literal.String.Other */ 45 | .highlight .sr { color: #0000FF } /* Literal.String.Regex */ 46 | .highlight .s1 { color: #0000FF } /* Literal.String.Single */ 47 | .highlight .ss { color: #0000FF } /* Literal.String.Symbol */ 48 | .highlight .il { color: #0000FF } /* Literal.Number.Integer.Long */ 49 | -------------------------------------------------------------------------------- /demo/css/stepy.demo.css: -------------------------------------------------------------------------------- 1 | .stepy-header { list-style: none; padding: 0; width: 724px } 2 | .stepy-header li { cursor: pointer; float: left; padding: 10px } 3 | .stepy-header li.stepy-error { background: url('../demo/img/error.png') no-repeat right top } 4 | .stepy-header li div { color: #ccc; font: bold 2.8em verdana; text-shadow: 1px 1px #f8f8f8 } 5 | .stepy-header li.stepy-active div { color: #369; cursor: auto } 6 | .stepy-header li span { color: #ccc; font: 1.4em verdana } 7 | .stepy-header li.stepy-active span { color: #bbb } 8 | 9 | .stepy-step { border: 1px solid #bbb; clear: left; padding: 15px 20px; width: 600px; -khtml-border-radius: 3px; -moz-border-radius: 3px; -opera-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px } 10 | .stepy-step label { color: #222; display: block; font: bold 1.5em arial; letter-spacing: .7px; margin: 10px 0 3px 1px } 11 | 12 | .stepy-step input, 13 | .stepy-step textarea, 14 | .stepy-step select { border: 1px solid #999; border-radius: 5px; color: #333; font-size: 1.4em; height: 27px; margin-bottom: 12px; padding: 3px; width: 90% } 15 | 16 | .stepy-step select { height: 34px; padding-top: 5px } 17 | 18 | .stepy-step textarea { height: 100px } 19 | 20 | .stepy-back { 21 | float: left 22 | } 23 | 24 | .stepy-back, .stepy-next { 25 | -khtml-border-radius: 3px; 26 | -moz-border-radius: 3px; 27 | -opera-border-radius: 3px; 28 | -webkit-border-radius: 3px; 29 | border-radius: 3px; 30 | border: 1px solid #ccc; 31 | color: #7f0055; 32 | cursor: pointer; 33 | font: 1.2em verdana; 34 | padding: 7px 15px 8px; 35 | text-decoration: none; 36 | } 37 | 38 | .stepy-back:hover, .stepy-next:hover { 39 | border-color: #bbb; 40 | color: #b07; 41 | } 42 | 43 | .stepy-finish { 44 | background-color: transparent; 45 | border-radius: 3px !important; 46 | border: 1px solid #ccc !important; 47 | float: right; 48 | height: 33px !important; 49 | width: 80px !important; 50 | } 51 | 52 | .stepy-legend { 53 | color: #4080bf; 54 | font: bold 1.8em arial; 55 | letter-spacing: .7px; 56 | padding: 0 2px 3px 57 | } 58 | 59 | .stepy-next { 60 | float: right 61 | } 62 | -------------------------------------------------------------------------------- /demo/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /demo/img/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/img/alert.png -------------------------------------------------------------------------------- /demo/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/img/error.png -------------------------------------------------------------------------------- /demo/img/image-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/img/image-1.png -------------------------------------------------------------------------------- /demo/img/image-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/img/image-2.png -------------------------------------------------------------------------------- /demo/img/image-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbotelhos/stepy/96d0cf9a02ee76bd684c0dd28b1056a59daccaaa/demo/img/image-3.png -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | jQuery Stepy - A Wizard Plugin 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | 31 | 32 | 40 |
41 | 42 | 43 | 44 |

45 | Markup 46 |

47 | 48 |

49 | You need a form with the right markup as following.
50 | Each .stepy-step will became a step.
51 | The title of the .stepy-step will be the headers titles.
52 | And the .stepy-legend will be the header title description.
53 | Inside the .stepy-step you put your stuffs. 54 |

55 | 56 |
57 |
  58 | <form>
  59 |   <fieldset title="Step 1" class="stepy-step">
  60 |     <legend class="stepy-legend">legend one</legend>
  61 | 
  62 |     <!-- inputs -->
  63 |   </fieldset>
  64 | 
  65 |   <fieldset title="Step 2" class="stepy-step">
  66 |     <legend class="stepy-legend">legend two</legend>
  67 | 
  68 |     <!-- inputs -->
  69 |   </fieldset>
  70 | 
  71 |   <fieldset title="Step 3" class="stepy-step">
  72 |     <legend class="stepy-legend">legend three</legend>
  73 | 
  74 |     <!-- inputs -->
  75 |   </fieldset>
  76 | 
  77 |   <a class="stepy-back">back</a>
  78 |   <a class="stepy-next">next</a>
  79 |   <input type="submit" class="stepy-finish" />
  80 | </form>
  81 | 
82 |
83 | 84 | 85 | 86 |

87 | Default 88 |

89 | 90 |

Using the default options.

91 | 92 |
93 |
94 |
95 | Access 96 | 97 | 98 | 99 |

100 | 101 | 102 |

103 | 104 |

105 | 106 | 107 |

108 | 109 |

110 | 111 | 112 |

113 | 114 | back 115 | next 116 |
117 | 118 |
119 | About you 120 | 121 |

122 | 123 | 124 |

125 | 126 |

127 | 128 | 129 | 133 |

134 | 135 |

136 | 137 | 138 |

139 | 140 | back 141 | next 142 |
143 | 144 |
145 | Your professional informations 146 | 147 |

148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 |

160 | 161 |

162 | 163 | 164 |

165 | 166 | back 167 | next 168 | 169 | 170 |
171 |
172 |
173 | 174 |
175 |
 176 | $('form').stepy();
 177 | 
178 |
179 | 180 | 181 | 182 |

183 | Title Click 184 |

185 | 186 |

187 | You can to use the header items to navigate between the steps with a click.
188 | The header click is good when you have a lot of steps and want to jump a non sequential steps. 189 |

190 | 191 |
192 |
193 |
194 | Access 195 | 196 | 197 | 198 |

199 | 200 | 201 |

202 | 203 |

204 | 205 | 206 |

207 | 208 |

209 | 210 | 211 |

212 | 213 | back 214 | next 215 |
216 | 217 |
218 | About you 219 | 220 |

221 | 222 | 223 |

224 | 225 |

226 | 227 | 228 | 232 |

233 | 234 |

235 | 236 | 237 |

238 | 239 | back 240 | next 241 |
242 | 243 |
244 | Your professional informations 245 | 246 |

247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 |

259 | 260 |

261 | 262 | 263 |

264 | 265 | back 266 | next 267 | 268 | 269 |
270 |
271 |
272 | 273 |
274 |
 275 | $('.form').stepy({ titleClick: true });
 276 | 
277 |
278 | 279 | 280 | 281 |

282 | Description 283 |

284 | 285 |

286 | Each step receives your description that is the .stepy-legend element of the .stepy-step.
287 | That element is used on header to describe the step, but you can disabled it.
288 | Disable the description does not hide the original .stepy-legend element. If you want to hide just the .stepy-legend element, use CSS for it. 289 |

290 | 291 |
292 |
293 |
294 | Access 295 | 296 | 297 | 298 |

299 | 300 | 301 |

302 | 303 |

304 | 305 | 306 |

307 | 308 |

309 | 310 | 311 |

312 | 313 | back 314 | next 315 |
316 | 317 |
318 | About you 319 | 320 |

321 | 322 | 323 |

324 | 325 |

326 | 327 | 328 | 332 |

333 | 334 |

335 | 336 | 337 |

338 | 339 | back 340 | next 341 |
342 | 343 |
344 | Your professional informations 345 | 346 |

347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 |

359 | 360 |

361 | 362 | 363 |

364 | 365 | back 366 | next 367 | 368 | 369 |
370 |
371 |
372 | 373 |
374 |
 375 | $('form').stepy({ description: false });
 376 | 
377 |
378 | 379 | 380 | 381 |

382 | Enter 383 |

384 | 385 |

386 | By default, when you press the key enter, the next step will be called giving you a better usability.
387 | If the option validate is enabled, then the step will be validated before. 388 |

389 | 390 |
391 |
392 |
393 | Access 394 | 395 | 396 | 397 |

398 | 399 | 400 |

401 | 402 |

403 | 404 | 405 |

406 | 407 |

408 | 409 | 410 |

411 | 412 | back 413 | next 414 |
415 | 416 |
417 | About you 418 | 419 |

420 | 421 | 422 |

423 | 424 |

425 | 426 | 427 | 431 |

432 | 433 |

434 | 435 | 436 |

437 | 438 | back 439 | next 440 |
441 | 442 |
443 | Your professional informations 444 | 445 |

446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 |

458 | 459 |

460 | 461 | 462 |

463 | 464 | back 465 | next 466 | 467 | 468 |
469 |
470 |
471 | 472 |
473 |
 474 | $('form').stepy({ enter: true });
 475 | 
476 |
477 | 478 | 479 | 480 |

481 | Finish Button 482 |

483 | 484 |

485 | The selector of you finish button. 486 |

487 | 488 |
489 |
490 |
491 | Access 492 | 493 | 494 | 495 |

496 | 497 | 498 |

499 | 500 |

501 | 502 | 503 |

504 | 505 |

506 | 507 | 508 |

509 | 510 | back 511 | next 512 |
513 | 514 |
515 | About you 516 | 517 |

518 | 519 | 520 |

521 | 522 |

523 | 524 | 525 | 529 |

530 | 531 |

532 | 533 | 534 |

535 | 536 | back 537 | next 538 |
539 | 540 |
541 | Your professional informations 542 | 543 |

544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 |

556 | 557 |

558 | 559 | 560 |

561 | 562 | back 563 | next 564 | 565 | 566 |
567 |
568 |
569 | 570 |
571 |
 572 | $('form').stepy({ finishButton: false });
 573 | 
574 |
575 | 576 | 577 | 578 |

579 | Finish 580 |

581 | 582 |

583 | Callback to be called when you press the finish button. Inside it you can prevent the submit returning false.
584 | The element that will trigger can be a submit type element or any other button with the class stepy-finish. 585 |

586 | 587 |
588 |
589 |
590 | Access 591 | 592 | 593 | 594 |

595 | 596 | 597 |

598 | 599 |

600 | 601 | 602 |

603 | 604 |

605 | 606 | 607 |

608 | 609 | back 610 | next 611 |
612 | 613 |
614 | About you 615 | 616 |

617 | 618 | 619 |

620 | 621 |

622 | 623 | 624 | 628 |

629 | 630 |

631 | 632 | 633 |

634 | 635 | back 636 | next 637 |
638 | 639 |
640 | Your professional informations 641 | 642 |

643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 |

655 | 656 |

657 | 658 | 659 |

660 | 661 | back 662 | next 663 | 664 | 665 |
666 |
667 |
668 | 669 |
670 |
 671 | $('form').stepy({
 672 | finish: function() {
 673 |   alert('Canceling...');
 674 |   return false;
 675 | }
 676 | });
 677 | 
678 |
679 | 680 | 681 | 682 |

683 | Legend 684 |

685 | 686 |

687 | Display the .stepy-legend element on fieldset.
688 | When this option is false, it's just hidden. The content of the .stepy-legend element will be used to set the header description. 689 |

690 | 691 |
692 |
693 |
694 | Access 695 | 696 | 697 | 698 |

699 | 700 | 701 |

702 | 703 |

704 | 705 | 706 |

707 | 708 |

709 | 710 | 711 |

712 | 713 | back 714 | next 715 |
716 | 717 |
718 | About you 719 | 720 |

721 | 722 | 723 |

724 | 725 |

726 | 727 | 728 | 732 |

733 | 734 |

735 | 736 | 737 |

738 | 739 | back 740 | next 741 |
742 | 743 |
744 | Your professional informations 745 | 746 |

747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 |

759 | 760 |

761 | 762 | 763 |

764 | 765 | back 766 | next 767 | 768 | 769 |
770 |
771 |
772 | 773 |
774 |
 775 | $('form').stepy({ legend: false });
 776 | 
777 |
778 | 779 | 780 |

781 | Next 782 |

783 | 784 |

785 | This callback is trigged before you go to the next step.
786 | Like the other callback, if you return false it won't go to the next step.
787 | Here you can do your own validation, manually or using your favorite plugin. 788 |

789 | 790 |
791 |
792 |
793 | Access 794 | 795 | 796 | 797 |

798 | 799 | 800 |

801 | 802 |

803 | 804 | 805 |

806 | 807 |

808 | 809 | 810 |

811 | 812 | back 813 | next 814 |
815 | 816 |
817 | About you 818 | 819 |

820 | 821 | 822 |

823 | 824 |

825 | 826 | 827 | 831 |

832 | 833 |

834 | 835 | 836 |

837 | 838 | back 839 | next 840 |
841 | 842 |
843 | Your professional informations 844 | 845 |

846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 |

858 | 859 |

860 | 861 | 862 |

863 | 864 | back 865 | next 866 | 867 | 868 |
869 |
870 |
871 | 872 |
873 |
 874 | $('form').stepy({
 875 | next: function(index, totalSteps) {
 876 |   alert('Going to step: ' + index + ' with total of steps: ' + totalSteps);
 877 | }
 878 | });
 879 | 
880 |
881 | 882 | 883 |

884 | Back 885 |

886 | 887 |

888 | This callback is trigged before you go to the back step.
889 | Like the other callback, if you return false it won't go to the back step. 890 |

891 | 892 |
893 |
894 |
895 | Access 896 | 897 | 898 | 899 |

900 | 901 | 902 |

903 | 904 |

905 | 906 | 907 |

908 | 909 |

910 | 911 | 912 |

913 | 914 | back 915 | next 916 |
917 | 918 |
919 | About you 920 | 921 |

922 | 923 | 924 |

925 | 926 |

927 | 928 | 929 | 933 |

934 | 935 |

936 | 937 | 938 |

939 | 940 | back 941 | next 942 |
943 | 944 |
945 | Your professional informations 946 | 947 |

948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | 956 | 957 | 958 | 959 |

960 | 961 |

962 | 963 | 964 |

965 | 966 | back 967 | next 968 | 969 | 970 |
971 |
972 |
973 | 974 |
975 |
 976 | $('form').stepy({
 977 | back: function(index, totalSteps) {
 978 |   alert('Returning to step: ' + index + ' with total of steps: ' + totalSteps);
 979 | }
 980 | });
 981 | 
982 |
983 | 984 | 985 | 986 |

987 | Select 988 |

989 | 990 |

991 | This callback is trigged when the current step is rendered.
992 | Here you can do actions to manipulate the current step with the elements shown to the user. 993 |

994 | 995 |
996 |
997 |
998 | Access 999 | 1000 | 1001 | 1002 |

1003 | 1004 | 1005 |

1006 | 1007 |

1008 | 1009 | 1010 |

1011 | 1012 |

1013 | 1014 | 1015 |

1016 | 1017 | back 1018 | next 1019 |
1020 | 1021 |
1022 | About you 1023 | 1024 |

1025 | 1026 | 1027 |

1028 | 1029 |

1030 | 1031 | 1032 | 1036 |

1037 | 1038 |

1039 | 1040 | 1041 |

1042 | 1043 | back 1044 | next 1045 |
1046 | 1047 |
1048 | Your professional informations 1049 | 1050 |

1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 |

1063 | 1064 |

1065 | 1066 | 1067 |

1068 | 1069 | back 1070 | next 1071 | 1072 | 1073 |
1074 |
1075 |
1076 | 1077 |
1078 |
1079 | $('form').stepy({
1080 | select: function(index, totalSteps) {
1081 |   alert('Rendered step: ' + index + ' with total of steps: ' + totalSteps);
1082 | }
1083 | });
1084 | 
1085 |
1086 | 1087 | 1088 | 1089 |

1090 | Title Target 1091 |

1092 | 1093 |

1094 | You can change the place where the header will be rendered passing the selector of the element where the header will be appended.
1095 |

1096 | 1097 |
1098 |
1099 |
1100 | Access 1101 | 1102 | 1103 | 1104 |

1105 | 1106 | 1107 |

1108 | 1109 |

1110 | 1111 | 1112 |

1113 | 1114 |

1115 | 1116 | 1117 |

1118 | 1119 | back 1120 | next 1121 |
1122 | 1123 |
1124 | About you 1125 | 1126 |

1127 | 1128 | 1129 |

1130 | 1131 |

1132 | 1133 | 1134 | 1138 |

1139 | 1140 |

1141 | 1142 | 1143 |

1144 | 1145 | back 1146 | next 1147 |
1148 | 1149 |
1150 | Your professional informations 1151 | 1152 |

1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 |

1165 | 1166 |

1167 | 1168 | 1169 |

1170 | 1171 | back 1172 | next 1173 | 1174 | 1175 |
1176 |
1177 | 1178 |
1179 |
1180 | 1181 |
1182 |
1183 | $('form').stepy({ titleClick:  true });
1184 | 
1185 |
1186 | 1187 | 1188 | 1189 |

1190 | Transition and Duration 1191 |

1192 | 1193 |

1194 | You can set an effect during the transitions between the steps.
1195 | You can choose fade, slide or undefined for the normal transition. 1196 |

1197 | 1198 |
1199 |
1200 |
1201 | Access 1202 | 1203 | 1204 | 1205 |

1206 | 1207 | 1208 |

1209 | 1210 |

1211 | 1212 | 1213 |

1214 | 1215 |

1216 | 1217 | 1218 |

1219 | 1220 | back 1221 | next 1222 |
1223 | 1224 |
1225 | About you 1226 | 1227 |

1228 | 1229 | 1230 |

1231 | 1232 |

1233 | 1234 | 1235 | 1239 |

1240 | 1241 |

1242 | 1243 | 1244 |

1245 | 1246 | back 1247 | next 1248 |
1249 | 1250 |
1251 | Your professional informations 1252 | 1253 |

1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 |

1266 | 1267 |

1268 | 1269 | 1270 |

1271 | 1272 | back 1273 | next 1274 | 1275 | 1276 |
1277 |
1278 |
1279 | 1280 |
1281 |
1282 | $('form').stepy({
1283 | duration  : 400,
1284 | transition: 'fade'
1285 | });
1286 | 
1287 |
1288 | 1289 | 1290 | 1291 | 1294 | 1295 |

1296 | If you don't want a header, you can just change header to false and it won't be created.
1297 |

1298 | 1299 |
1300 |
1301 |
1302 | Access 1303 | 1304 |

1305 | 1306 | 1307 |

1308 | 1309 |

1310 | 1311 | 1312 |

1313 | 1314 |

1315 | 1316 | 1317 |

1318 |
1319 | 1320 |
1321 | About you 1322 | 1323 |

1324 | 1325 | 1326 |

1327 | 1328 |

1329 | 1330 | 1331 | 1335 |

1336 | 1337 |

1338 | 1339 | 1340 |

1341 |
1342 | 1343 |
1344 | Your professional informations 1345 | 1346 |

1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 |

1359 | 1360 |

1361 | 1362 | 1363 |

1364 |
1365 | 1366 | back 1367 | next 1368 | 1369 | 1370 |
1371 |
1372 | 1373 |
1374 |
1375 | $('form').stepy({ header: false });
1376 | 
1377 |
1378 | 1379 | 1380 | 1381 |

1382 | backButton 1383 |

1384 | 1385 |

1386 | The class to find the back button inside each step.
1387 |

1388 | 1389 |
1390 |
1391 |
1392 | Access 1393 | 1394 |

1395 | 1396 | 1397 |

1398 | 1399 |

1400 | 1401 | 1402 |

1403 | 1404 |

1405 | 1406 | 1407 |

1408 | 1409 | back 1410 | next 1411 |
1412 | 1413 |
1414 | About you 1415 | 1416 |

1417 | 1418 | 1419 |

1420 | 1421 |

1422 | 1423 | 1424 | 1428 |

1429 | 1430 |

1431 | 1432 | 1433 |

1434 | 1435 | back 1436 | next 1437 |
1438 | 1439 |
1440 | Your professional informations 1441 | 1442 |

1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 |

1455 | 1456 |

1457 | 1458 | 1459 |

1460 | 1461 | back 1462 | next 1463 | 1464 | 1465 |
1466 |
1467 |
1468 | 1469 |
1470 |
1471 | $('form').stepy({ backButton: '.stepy-back' });
1472 | 
1473 |
1474 | 1475 | 1476 | 1477 |

1478 | nextButton 1479 |

1480 | 1481 |

1482 | The class to find the back button inside each step.
1483 |

1484 | 1485 |
1486 |
1487 |
1488 | Access 1489 | 1490 |

1491 | 1492 | 1493 |

1494 | 1495 |

1496 | 1497 | 1498 |

1499 | 1500 |

1501 | 1502 | 1503 |

1504 | 1505 | back 1506 | next 1507 |
1508 | 1509 |
1510 | About you 1511 | 1512 |

1513 | 1514 | 1515 |

1516 | 1517 |

1518 | 1519 | 1520 | 1524 |

1525 | 1526 |

1527 | 1528 | 1529 |

1530 | 1531 | back 1532 | next 1533 |
1534 | 1535 |
1536 | Your professional informations 1537 | 1538 |

1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 |

1551 | 1552 |

1553 | 1554 | 1555 |

1556 | 1557 | back 1558 | next 1559 | 1560 | 1561 |
1562 |
1563 |
1564 | 1565 |
1566 |
1567 | $('form').stepy({ nextButton: '.stepy-next' });
1568 | 
1569 |
1570 | 1571 | 1572 | 1573 |

1574 | Global Buttons 1575 |

1576 | 1577 |

1578 | If you wish, you can use global buttons to control the steps, just put it where you want.
1579 |

1580 | 1581 |
1582 |
1583 |
1584 | Access 1585 | 1586 |

1587 | 1588 | 1589 |

1590 | 1591 |

1592 | 1593 | 1594 |

1595 | 1596 |

1597 | 1598 | 1599 |

1600 |
1601 | 1602 |
1603 | About you 1604 | 1605 |

1606 | 1607 | 1608 |

1609 | 1610 |

1611 | 1612 | 1613 | 1617 |

1618 | 1619 |

1620 | 1621 | 1622 |

1623 |
1624 | 1625 |
1626 | Your professional informations 1627 | 1628 |

1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 |

1641 | 1642 |

1643 | 1644 | 1645 |

1646 |
1647 | 1648 | back 1649 | next 1650 | 1651 | 1652 |
1653 |
1654 | 1655 |
1656 |
1657 | $('form').stepy({ nextButton: '.stepy-next' });
1658 | 
1659 |
1660 | 1661 | 1662 | 1663 |

1664 | validate 1665 |

1666 | 1667 |

1668 | You can integrate any plugin of validation on your steps, just saying if each field is valid or not. 1669 |

1670 | 1671 |
1672 |
1673 |
1674 | Access 1675 | 1676 |

1677 | 1678 | 1679 |

1680 | 1681 |

1682 | 1683 | 1684 |

1685 | 1686 |

1687 | 1688 | 1689 |

1690 |
1691 | 1692 |
1693 | About you 1694 | 1695 |

1696 | 1697 | 1698 |

1699 | 1700 |

1701 | 1702 | 1703 | 1707 |

1708 | 1709 |

1710 | 1711 | 1712 |

1713 |
1714 | 1715 |
1716 | Your professional informations 1717 | 1718 |

1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 |

1731 | 1732 |

1733 | 1734 | 1735 |

1736 |
1737 | 1738 | back 1739 | next 1740 | 1741 | 1742 |
1743 |
1744 | 1745 |
1746 |
1747 | $('form').stepy({ nextButton: '.stepy-next' });
1748 | 
1749 |
1750 | 1751 | 1752 | 1753 |

1754 | block 1755 |

1756 | 1757 |

1758 | This options blocks the navigation to next step if the current is invalid. 1759 |

1760 | 1761 |
1762 |
1763 |
1764 | Access 1765 | 1766 |

1767 | 1768 | 1769 |

1770 | 1771 |

1772 | 1773 | 1774 |

1775 | 1776 |

1777 | 1778 | 1779 |

1780 |
1781 | 1782 |
1783 | About you 1784 | 1785 |

1786 | 1787 | 1788 |

1789 | 1790 |

1791 | 1792 | 1793 | 1797 |

1798 | 1799 |

1800 | 1801 | 1802 |

1803 |
1804 | 1805 |
1806 | Your professional informations 1807 | 1808 |

1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 |

1821 | 1822 |

1823 | 1824 | 1825 |

1826 |
1827 | 1828 | back 1829 | next 1830 | 1831 | 1832 |
1833 |
1834 | 1835 |
1836 |
1837 | $('form').stepy({ nextButton: '.stepy-next' });
1838 | 
1839 |
1840 | 1841 | 1842 | 1843 |

1844 | Options: 1845 |

1846 | 1847 |
1848 |
back: undefined
1849 |

Callback before the backward action.

1850 |
1851 | 1852 |
1853 |
block: false
1854 |

Block the next step if the current is invalid.

1855 |
1856 | 1857 |
1858 |
description: false
1859 |

Choose if the descriptions of the titles will be showed.

1860 |
1861 | 1862 |
1863 |
duration: 0
1864 |

Duration of the transition between steps in ms.

1865 |
1866 | 1867 |
1868 |
enter: true
1869 |

Enables the enter key to change to the next step.

1870 |
1871 | 1872 |
1873 |
errorImage: false
1874 |

If an error occurs, a image is showed in the title of the corresponding step.

1875 |
1876 | 1877 |
1878 |
finish: undefined
1879 |

Callback before the finish action.

1880 |
1881 | 1882 |
1883 |
finishButton: true
1884 |

Include the button with class called '.finish' into the last step.

1885 |
1886 | 1887 | 1891 | 1892 |
1893 |
ignore: ''
1894 |

Choose the fields to be ignored on validation.

1895 |
1896 | 1897 |
1898 |
legend: false
1899 |

Choose if the legends of the steps will be showed.

1900 |
1901 | 1902 | 1906 | 1907 |
1908 |
select: undefined
1909 |

Callback executed when the step is shown.

1910 |
1911 | 1912 |
1913 |
titleClick: true
1914 |

Active the back and next action in the titles.

1915 |
1916 | 1917 |
1918 |
titleTarget: undefined
1919 |

Choose the place where titles will be placed.

1920 |
1921 | 1922 |
1923 |
transition: 'hide'
1924 |

Use transition between steps ('hide', 'fade' or 'slide').

1925 |
1926 | 1927 |
1928 |
validate: false
1929 |

Callback to each field of each step.

1930 |
1931 | 1932 |

1933 | Changing the settings globally: 1934 |

1935 | 1936 |

1937 | You can change any option mentioning the scope $.fn.stepy.defaults. + option_name. It must be called before you bind the plugin. 1938 |

1939 | 1940 |
1941 |
1942 | $.fn.stepy.defaults.validate = true;
1943 | $.fn.stepy.defaults.titleClick = true;
1944 | 
1945 |
1946 | 1947 | 1948 | 1949 |

1950 | Functions: 1951 |

1952 | 1953 |
1954 |
1955 |
1956 | $('form').stepy('step');
1957 | 
1958 |
1959 | 1960 |

Goes to the given step.

1961 |
1962 | 1963 |
1964 |
1965 |
1966 | $('form').stepy('destroy');
1967 | 
1968 |
1969 | 1970 |

Destroy the Stepy's bind and gives you the raw element before it.

1971 |
1972 | 1973 |
1974 | 1975 |
1976 |

1977 | Ruby, Java and Python Developer in R7.com Portal.
1978 | Bachelor's in Information Systems and certified OCJA 1.0 and OCJP 6.
1979 | Helper and learner of the open source community, and designer adventurer.
1980 | Also has a passion for dance, skate, jiu-jitsu and Counter Strike Source. (: 1981 |

1982 |
1983 | 1984 | 1990 |
1991 | 1992 | 1995 |
1996 | 1997 | 2065 | 2066 | 2067 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | 'use strict'; 3 | 4 | config.set({ 5 | autoWatch: true, 6 | debug: true, 7 | browsers: ['Chrome', 'Firefox'], 8 | frameworks: ['jasmine', 'fixture'], 9 | logLevel: config.LOG_ERROR, 10 | port: 9876, 11 | reporters: ['dots'], 12 | singleRun: true, 13 | 14 | files: [ 15 | 'node_modules/jquery/dist/jquery.min.js', 16 | 'node_modules/jasmine-jquery/lib/jasmine-jquery.js', 17 | 'node_modules/validaty/lib/jquery.validaty.js', 18 | 'node_modules/validaty/lib/jquery.validaty.validators.js', 19 | 20 | 'spec/spec_helper.js', 21 | 22 | 'spec/fixtures/*.html', 23 | 24 | 'lib/*.css', 25 | 'lib/*.js', 26 | 27 | 'spec/javascripts/**/*.js' 28 | ], 29 | 30 | preprocessors: { 31 | '**/*.html': ['html2js'] 32 | } 33 | }); 34 | }; 35 | -------------------------------------------------------------------------------- /lib/jquery.stepy.css: -------------------------------------------------------------------------------- 1 | .stepy-step { 2 | display: none; 3 | } 4 | 5 | .stepy-step.stepy-active { 6 | display: block; 7 | } 8 | 9 | .stepy-back, .stepy-next, .stepy-finish { 10 | visibility: hidden; 11 | } 12 | 13 | .stepy-back.stepy-active, .stepy-next.stepy-active, .stepy-finish.stepy-active { 14 | visibility: visible; 15 | } 16 | -------------------------------------------------------------------------------- /lib/jquery.stepy.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Stepy - A Wizard Plugin 3 | * 4 | * The MIT License 5 | * 6 | * @author: Washington Botelho 7 | * @doc: wbotelhos.com/stepy 8 | * @version: 1.1.0 9 | * 10 | */ 11 | 12 | ;(function($) { 13 | 'use strict'; 14 | 15 | var methods = { 16 | init: function(settings) { 17 | return this.each(function() { 18 | methods.destroy.call(this); 19 | 20 | this.stepyOptions = $.extend({}, $.fn.stepy.defaults, settings); 21 | 22 | var self = $(this); 23 | 24 | methods._generateId.call(this); 25 | 26 | if (this.stepyOptions.header) { 27 | this.header = methods._header.call(this); 28 | } 29 | 30 | this.steps = self.find('.' + this.stepyOptions.stepClass); 31 | 32 | var that = this; 33 | 34 | this.steps.each(function(index) { 35 | var self = $(this); 36 | 37 | self.addClass(that.stepyOptions.stepClass); 38 | 39 | if (index === 0) { 40 | self.addClass('stepy-active'); 41 | } 42 | 43 | if (that.stepyOptions.header) { 44 | methods._createHead.call(that, this, index); 45 | } 46 | }); 47 | 48 | methods._bindNextButton.call(this); 49 | methods._bindBackButton.call(this); 50 | methods._bindFinishButton.call(this); 51 | 52 | if (this.stepyOptions.header) { 53 | methods._bindHeader.call(this); 54 | } 55 | 56 | if (this.stepyOptions.enter) { 57 | methods._bindEnter.call(this); 58 | } 59 | 60 | this.steps.first().find(':input:visible:enabled:first').trigger('select').trigger('focus'); 61 | 62 | methods._setState.call(this, { settings: this.stepyOptions, index: 0, stepy: true }); 63 | 64 | methods._stateButton.call(this, this.steps); 65 | }); 66 | }, 67 | 68 | _bindBackButton: function() { 69 | var button = $(this).find(this.stepyOptions.backButton); 70 | 71 | if (!button.length) { 72 | return; 73 | } 74 | 75 | button.on('click.stepy', function(e) { 76 | e.preventDefault(); 77 | 78 | var index = $(this).data('index') - 1; 79 | 80 | if (index >= 0 && (!this.stepyOptions.back || methods._execute.call(this, this.stepyOptions.back, index, this.steps.length))) { 81 | methods.step.call(this, index); 82 | } 83 | }.bind(this)); 84 | }, 85 | 86 | _bindEnter: function() { 87 | var that = this; 88 | 89 | this.steps.find('input:not(:button, :submit)').on('keypress.stepy', function(evt) { 90 | var key = (evt.keyCode ? evt.keyCode : evt.which); 91 | 92 | if (key === 13) { 93 | evt.preventDefault(); 94 | 95 | var 96 | step = $(this).closest('.' + that.stepyOptions.stepClass), 97 | hasNext = step.next('.' + that.stepyOptions.stepClass).length; 98 | 99 | if (hasNext) { 100 | step.find(that.stepyOptions.nextButton).trigger('click'); 101 | } else if (that.finishButton) { 102 | that.finishButton.trigger('click'); 103 | } 104 | } 105 | }); 106 | }, 107 | 108 | _bindFinishButton: function() { 109 | this.finishButton = $(this).find(this.stepyOptions.finishButton); 110 | 111 | if (!this.finishButton.length) { 112 | return $.error('submit button "' + this.stepyOptions.finishButton + '" missing.'); 113 | } 114 | 115 | this.finishButton.on('click.stepy', methods._onFinishButton.bind(this)); 116 | }, 117 | 118 | _bindHeader: function() { 119 | this.heads = this.header.find('li'); 120 | 121 | this.heads.first().addClass('stepy-active'); 122 | 123 | if (this.stepyOptions.titleClick) { 124 | var that = this; 125 | 126 | this.heads.on('click', function() { 127 | methods._bindHeaderHandler.call(that, this); 128 | }); 129 | } else { 130 | this.heads.css('cursor', 'default'); 131 | } 132 | }, 133 | 134 | _bindHeaderHandler: function(head) { 135 | var 136 | current = parseInt($(this.heads).filter('.stepy-active')[0].id.match(/\d/)[0], 10), 137 | clicked = parseInt(head.id.match(/\d/)[0], 10); 138 | 139 | if (clicked > current) { 140 | if (this.stepyOptions.next && !methods._execute.call(this, this.stepyOptions.next, clicked)) { 141 | return false; 142 | } 143 | } else if (clicked < current) { 144 | if (this.stepyOptions.back && !methods._execute.call(this, this.stepyOptions.back, clicked)) { 145 | return false; 146 | } 147 | } 148 | 149 | if (clicked != current) { 150 | methods.step.call(this, clicked); 151 | } 152 | }, 153 | 154 | _bindNextButton: function() { 155 | var button = $(this).find(this.stepyOptions.nextButton); 156 | 157 | if (!button.length) { 158 | return; 159 | } 160 | 161 | button.on('click.stepy', function(e) { 162 | e.preventDefault(); 163 | 164 | var index = $(this).data('index') + 1; 165 | 166 | if (index < this.steps.length && (!this.stepyOptions.next || methods._execute.call(this, this.stepyOptions.next, index, this.steps.length))) { 167 | methods.step.call(this, index); 168 | } 169 | }.bind(this)); 170 | }, 171 | 172 | _createHead: function(step, index) { 173 | var 174 | step = $(step).attr('id', this.getAttribute('id') + '-step-' + index), 175 | head = methods._head.call(this, index); 176 | 177 | head.append(methods._title.call(this, step)); 178 | 179 | if (this.stepyOptions.description) { 180 | var description = methods._description.call(this, step); 181 | 182 | if (description.length) { 183 | head.append(description); 184 | } 185 | } 186 | 187 | this.header.append(head); 188 | }, 189 | 190 | _description: function(step) { 191 | var legend = step.find('.' + this.stepyOptions.legendClass); 192 | 193 | if (!this.stepyOptions.legend) { 194 | legend.hide(); 195 | } 196 | 197 | if (!legend.length) { 198 | return null; 199 | } 200 | 201 | return $('', { html: legend.html() }); 202 | }, 203 | 204 | _execute: function(callback, index, totalSteps) { 205 | if (callback === undefined) { 206 | return true; 207 | } 208 | 209 | var isValid = callback.call(this, index, totalSteps); 210 | 211 | return isValid || isValid === undefined; 212 | }, 213 | 214 | _generateId: function() { 215 | var id = this.getAttribute('id'); 216 | 217 | if (id === undefined || id === '') { 218 | $(this).attr('id', 'stepy-' + Math.random().toString().substring(2)); 219 | } 220 | }, 221 | 222 | _head: function(index) { 223 | return $('
  • ', { id: this.getAttribute('id') + '-head-' + index }); 224 | }, 225 | 226 | _header: function() { 227 | var header = $('