Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
heminei committed Jan 30, 2015
1 parent 96dfc4c commit e684bb5
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 34 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 Martin Bratvanov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

104 changes: 104 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
jquery-hemi-intro
=========================

jQuery custom select plugin. Custom responsive design.

Demo:
-----------

http://heminei.github.io/jquery-hemi-intro/demo/

How to use:
-----------

```html
<link href="/src/jquery.hemiIntro-1.0.css" rel="stylesheet" type="text/css"/>
<script src="/src/jquery.hemiIntro-1.0.js" type="text/javascript"></script>
```

```javascript
$(function () {
var intro = $.hemiIntro({
steps: [
{
selector: ".nav-justified",
placement: "bottom",
content: "Text text text text text text text text text text",
},
{
selector: ".jumbotron",
placement: "bottom",
content: "Text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2"
},
]
});
intro.start();
});
```

Options:
-----------
```javascript
$(function () {
$.hemiIntro({
debug: false,
steps: [],
startFromStep: 0,
backdrop: {
element: $("<div>"),
class: "hemi-intro-backdrop"
},
popover: {
template: '<div class="popover hemi-intro-popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
},
buttons: {
holder: {
element: $("<div>"),
class: "hemi-intro-buttons-holder"
},
next: {
element: $("<button>Next</button>"),
class: "btn btn-primary"
},
finish: {
element: $("<button>Finish</button>"),
class: "btn btn-primary"
}
},
welcomeDialog: {
show: false,
selector: null
},
scroll: {
anmationSpeed: 500
},
currentStep: {
selectedClass: "hemi-intro-selected"
},
init: function (plugin) {

},
onLoad: function (plugin) {

},
onStart: function (plugin) {

},
onBeforeChangeStep: function (plugin) {

},
onAfterChangeStep: function (plugin) {

},
onShowModalDialog: function (plugin, modal) {

},
onHideModalDialog: function (plugin, modal) {

},
onComplete: function (plugin) {

}
});
});
```
90 changes: 79 additions & 11 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,31 +77,99 @@ <h2>Heading</h2>
<p>&copy; Company 2014</p>
</footer>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>

<script type="text/javascript">
//<!--
$(function () {
var intro = $.hemiIntro({
debug: true,
debug: false,
steps: [
{
"selector": ".nav-justified",
"placement": "bottom",
"content": "Text text text text text text text text text text"
selector: ".nav-justified",
placement: "bottom",
content: "Text text text text text text text text text text",
},
{
"selector": ".jumbotron",
"placement": "bottom",
"content": "Text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2"
selector: ".jumbotron",
placement: "bottom",
content: "Text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2 text2"
},
],
init: function () {
console.log("init");
startFromStep: 0,
backdrop: {
element: $("<div>"),
class: "hemi-intro-backdrop"
},
popover: {
template: '<div class="popover hemi-intro-popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
},
buttons: {
holder: {
element: $("<div>"),
class: "hemi-intro-buttons-holder"
},
next: {
element: $("<button>Next</button>"),
class: "btn btn-primary"
},
finish: {
element: $("<button>Finish</button>"),
class: "btn btn-primary"
}
},
welcomeDialog: {
show: true,
selector: "#myModal"
},
scroll: {
anmationSpeed: 500
},
onComplete: function() {
currentStep: {
selectedClass: "hemi-intro-selected"
},
init: function (plugin) {
console.log("init:");
},
onLoad: function (plugin) {
console.log("onLoad:");
},
onStart: function (plugin) {
console.log("onStart:");
},
onBeforeChangeStep: function () {
console.log("onBeforeChangeStep:");
},
onAfterChangeStep: function () {
console.log("onAfterChangeStep:");
},
onShowModalDialog: function (plugin, modal) {
console.log("onShowModalDialog:");
},
onHideModalDialog: function (plugin, modal) {
console.log("onHideModalDialog:");
},
onComplete: function (plugin) {
console.log("onComplete:");
}
});

intro.start();
});
//-->
Expand Down
2 changes: 1 addition & 1 deletion demo/justified-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body {
/* Main marketing message and sign up button */
.jumbotron {
text-align: center;
background-color: transparent;
background-color: #fff;
}
.jumbotron .btn {
padding: 14px 24px;
Expand Down
3 changes: 3 additions & 0 deletions src/jquery.hemiIntro-1.0.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/jquery.hemiIntro-1.0.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e684bb5

Please sign in to comment.