Skip to content

Commit 4b0a05d

Browse files
authored
Merge pull request usablica#775 from usablica/fix-dataset-mixedcase
Changed camelcase data attributes to lowercase
2 parents e452f37 + 860f738 commit 4b0a05d

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

docs/docs/hints/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ permalink: /hints/attributes/
88
You can use these HTML attributes to manage or alter hint elements.
99

1010
- `data-hint`: The tooltip text of hint
11-
- `data-hintPosition`: Optionally define the position of hint. Options: `top-middle`, `top-left`, `top-right`, `bottom-left`, `bottom-right`, `bottom-middle`, `middle-left`, `middle-right`, `middle-middle`. Default: `top-middle`
11+
- `data-hintposition`: Optionally define the position of hint. Options: `top-middle`, `top-left`, `top-right`, `bottom-left`, `bottom-right`, `bottom-middle`, `middle-left`, `middle-right`, `middle-middle`. Default: `top-middle`

docs/docs/intro/attributes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ You can use these HTML attributes to manage or alter intro elements.
99

1010
- `data-intro`: The tooltip text of step
1111
- `data-step`: Optionally define the number (priority) of step
12-
- `data-tooltipClass`: Optionally define a CSS class for tooltip
13-
- `data-highlightClass`: Optionally append a CSS class to the helperLayer
12+
- `data-tooltipclass`: Optionally define a CSS class for tooltip
13+
- `data-highlightclass`: Optionally append a CSS class to the helperLayer
1414
- `data-position`: Optionally define the position of tooltip, `top`, `left`, `right`, `bottom`, `bottom-left-aligned` (same as `bottom`), `bottom-middle-aligned`, `bottom-right-aligned` or `auto` (to detect the position of element and assign the correct position automatically). Default is `bottom`
15-
- `data-scrollTo`: Optionally define the element to scroll to, `element` or `tooltip`. Default is `element`.
15+
- `data-scrollto`: Optionally define the element to scroll to, `element` or `tooltip`. Default is `element`.
1616
- `data-disable-interaction`: To disable interactions with elements inside the highlighted box, `true` or `false` (also `1` or `0`).

example/callbacks/onbeforechange.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h1 data-step="1" data-intro="This is a tooltip!">Usage of onbeforechange</h1>
4040
<hr>
4141

4242
<div class="row-fluid marketing">
43-
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollTo='tooltip'>
43+
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollto='tooltip'>
4444
<h4>Section One</h4>
4545
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.</p>
4646

example/custom-class/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="container-narrow">
3535

3636
<div class="masthead">
37-
<ul class="nav nav-pills pull-right" data-step="5" data-tooltipClass='forLastStep' data-intro="Get it, use it.">
37+
<ul class="nav nav-pills pull-right" data-step="5" data-tooltipclass='forLastStep' data-intro="Get it, use it.">
3838
<li><a href="https://github.com/usablica/intro.js/tags"><i class='icon-black icon-download-alt'></i> Download</a></li>
3939
<li><a href="https://github.com/usablica/intro.js">Github</a></li>
4040
<li><a href="https://twitter.com/usablica">@usablica</a></li>

example/disable-interaction/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h1 data-step="1" data-intro="Interaction is disabled in this step" data-disable
4141
<hr>
4242

4343
<div class="row-fluid marketing">
44-
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollTo='tooltip'>
44+
<div class="span6" data-step="2" data-intro="Ok, wasn't that fun?" data-position='right' data-scrollto='tooltip'>
4545
<h4>Section One</h4>
4646
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis augue a neque cursus ac blandit orci faucibus. Phasellus nec metus purus.</p>
4747

intro.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@
185185
element: currentElement,
186186
intro: currentElement.getAttribute('data-intro'),
187187
step: parseInt(currentElement.getAttribute('data-step'), 10),
188-
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
189-
highlightClass: currentElement.getAttribute('data-highlightClass'),
188+
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
189+
highlightClass: currentElement.getAttribute('data-highlightclass'),
190190
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,
191-
scrollTo: currentElement.getAttribute('data-scrollTo') || this._options.scrollTo,
191+
scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,
192192
disableInteraction: disableInteraction
193193
};
194194
}
@@ -220,10 +220,10 @@
220220
element: currentElement,
221221
intro: currentElement.getAttribute('data-intro'),
222222
step: nextStep + 1,
223-
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
224-
highlightClass: currentElement.getAttribute('data-highlightClass'),
223+
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
224+
highlightClass: currentElement.getAttribute('data-highlightclass'),
225225
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition,
226-
scrollTo: currentElement.getAttribute('data-scrollTo') || this._options.scrollTo,
226+
scrollTo: currentElement.getAttribute('data-scrollto') || this._options.scrollTo,
227227
disableInteraction: disableInteraction
228228
};
229229
}
@@ -1707,7 +1707,7 @@
17071707
//first add intro items with data-step
17081708
_forEach(hints, function (currentElement) {
17091709
// hint animation
1710-
var hintAnimation = currentElement.getAttribute('data-hintAnimation');
1710+
var hintAnimation = currentElement.getAttribute('data-hintanimation');
17111711

17121712
if (hintAnimation) {
17131713
hintAnimation = (hintAnimation === 'true');
@@ -1718,9 +1718,9 @@
17181718
this._introItems.push({
17191719
element: currentElement,
17201720
hint: currentElement.getAttribute('data-hint'),
1721-
hintPosition: currentElement.getAttribute('data-hintPosition') || this._options.hintPosition,
1721+
hintPosition: currentElement.getAttribute('data-hintposition') || this._options.hintPosition,
17221722
hintAnimation: hintAnimation,
1723-
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
1723+
tooltipClass: currentElement.getAttribute('data-tooltipclass'),
17241724
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition
17251725
});
17261726
}.bind(this));

0 commit comments

Comments
 (0)