├── .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 | [](https://travis-ci.org/wbotelhos/stepy) 4 | [](https://badge.fury.io/js/stepy) 5 | [](https://david-dm.org/wbotelhos/stepy) 6 | [](https://david-dm.org/wbotelhos/stepy#info=devDependencies) 7 | [](https://codeclimate.com/github/wbotelhos/stepy) 8 | [](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 |
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 |A Wizard Plugin
30 |
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 |
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 | Using the default options.
91 | 92 |
176 | $('form').stepy();
177 |
178 |
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 |
275 | $('.form').stepy({ titleClick: true });
276 |
277 |
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 |
375 | $('form').stepy({ description: false });
376 |
377 |
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 |
474 | $('form').stepy({ enter: true });
475 |
476 | 485 | The selector of you finish button. 486 |
487 | 488 |
572 | $('form').stepy({ finishButton: false });
573 |
574 |
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 |
671 | $('form').stepy({
672 | finish: function() {
673 | alert('Canceling...');
674 | return false;
675 | }
676 | });
677 |
678 |
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 |
775 | $('form').stepy({ legend: false });
776 |
777 |
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 |
874 | $('form').stepy({
875 | next: function(index, totalSteps) {
876 | alert('Going to step: ' + index + ' with total of steps: ' + totalSteps);
877 | }
878 | });
879 |
880 |
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 |
976 | $('form').stepy({
977 | back: function(index, totalSteps) {
978 | alert('Returning to step: ' + index + ' with total of steps: ' + totalSteps);
979 | }
980 | });
981 |
982 |
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 |
1079 | $('form').stepy({
1080 | select: function(index, totalSteps) {
1081 | alert('Rendered step: ' + index + ' with total of steps: ' + totalSteps);
1082 | }
1083 | });
1084 |
1085 |
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 |
1183 | $('form').stepy({ titleClick: true });
1184 |
1185 |
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 |
1282 | $('form').stepy({
1283 | duration : 400,
1284 | transition: 'fade'
1285 | });
1286 |
1287 |
1296 | If you don't want a header, you can just change header
to false
and it won't be created.
1297 |
1375 | $('form').stepy({ header: false });
1376 |
1377 |
1386 | The class to find the back button inside each step.
1387 |
1471 | $('form').stepy({ backButton: '.stepy-back' });
1472 |
1473 |
1482 | The class to find the back button inside each step.
1483 |
1567 | $('form').stepy({ nextButton: '.stepy-next' });
1568 |
1569 |
1578 | If you wish, you can use global buttons to control the steps, just put it where you want.
1579 |
1657 | $('form').stepy({ nextButton: '.stepy-next' });
1658 |
1659 | 1668 | You can integrate any plugin of validation on your steps, just saying if each field is valid or not. 1669 |
1670 | 1671 |
1747 | $('form').stepy({ nextButton: '.stepy-next' });
1748 |
1749 | 1758 | This options blocks the navigation to next step if the current is invalid. 1759 |
1760 | 1761 |
1837 | $('form').stepy({ nextButton: '.stepy-next' });
1838 |
1839 | Callback before the backward action.
1850 |Block the next step if the current is invalid.
1855 |Choose if the descriptions of the titles will be showed.
1860 |Duration of the transition between steps in ms.
1865 |Enables the enter key to change to the next step.
1870 |If an error occurs, a image is showed in the title of the corresponding step.
1875 |Callback before the finish action.
1880 |Include the button with class called '.finish' into the last step.
1885 |Creates a header with title and description.
1890 |Choose the fields to be ignored on validation.
1895 |Choose if the legends of the steps will be showed.
1900 |Callback before the forward action.
1905 |Callback executed when the step is shown.
1910 |Active the back and next action in the titles.
1915 |Choose the place where titles will be placed.
1920 |Use transition between steps ('hide', 'fade' or 'slide').
1925 |Callback to each field of each step.
1930 |
1937 | You can change any option mentioning the scope $.fn.stepy.defaults.
+ option_name. It must be called before you bind the plugin.
1938 |
1942 | $.fn.stepy.defaults.validate = true;
1943 | $.fn.stepy.defaults.titleClick = true;
1944 |
1945 |
1956 | $('form').stepy('step');
1957 |
1958 | Goes to the given step.
1961 |
1966 | $('form').stepy('destroy');
1967 |
1968 | Destroy the Stepy's bind and gives you the raw element before it.
1971 |