|
112 | 112 | function _goToStep(step) {
|
113 | 113 | //because steps starts with zero
|
114 | 114 | this._currentStep = step - 2;
|
115 |
| - if(typeof(this._introItems) !== 'undefined') { |
| 115 | + if(typeof (this._introItems) !== 'undefined') { |
116 | 116 | _nextStep.call(this);
|
117 | 117 | }
|
118 | 118 | }
|
|
124 | 124 | * @method _nextStep
|
125 | 125 | */
|
126 | 126 | function _nextStep() {
|
127 |
| - if (typeof(this._currentStep) === 'undefined') { |
| 127 | + if (typeof (this._currentStep) === 'undefined') { |
128 | 128 | this._currentStep = 0;
|
129 | 129 | } else {
|
130 | 130 | ++this._currentStep;
|
|
133 | 133 | if((this._introItems.length) <= this._currentStep) {
|
134 | 134 | //end of the intro
|
135 | 135 | //check if any callback is defined
|
136 |
| - if (typeof this._introCompleteCallback === 'function') { |
| 136 | + if (typeof (this._introCompleteCallback) === 'function') { |
137 | 137 | this._introCompleteCallback.call(this);
|
138 | 138 | }
|
139 | 139 | _exitIntro.call(this, this._targetElement);
|
|
248 | 248 | */
|
249 | 249 | function _showElement(targetElement) {
|
250 | 250 |
|
251 |
| - if (typeof this._introChangeCallback !== 'undefined') { |
| 251 | + if (typeof (this._introChangeCallback) !== 'undefined') { |
252 | 252 | this._introChangeCallback.call(this, targetElement);
|
253 | 253 | }
|
254 | 254 |
|
|
362 | 362 | //Thanks to JavaScript Kit: http://www.javascriptkit.com/dhtmltutors/dhtmlcascade4.shtml
|
363 | 363 | var currentElementPosition = '';
|
364 | 364 | if (targetElement.currentStyle) { //IE
|
365 |
| - currentElementPosition = targetElement.currentStyle.position; |
| 365 | + currentElementPosition = targetElement.currentStyle['position']; |
366 | 366 | } else if (document.defaultView && document.defaultView.getComputedStyle) { //Firefox
|
367 | 367 | currentElementPosition = document.defaultView.getComputedStyle(targetElement, null).getPropertyValue('position');
|
368 | 368 | }
|
|
450 | 450 | //set overlay layer position
|
451 | 451 | var elementPosition = _getOffset(targetElm);
|
452 | 452 | if(elementPosition) {
|
453 |
| - styleText += 'width: ' + elementPosition.width + 'px; height:' + |
454 |
| - elementPosition.height + 'px; top:' + elementPosition.top + |
455 |
| - 'px;left: ' + elementPosition.left + 'px;'; |
| 453 | + styleText += 'width: ' + elementPosition.width + 'px; height:' + elementPosition.height + 'px; top:' + elementPosition.top + 'px;left: ' + elementPosition.left + 'px;'; |
456 | 454 | overlayLayer.setAttribute('style', styleText);
|
457 | 455 | }
|
458 | 456 | }
|
|
513 | 511 | * @returns obj3 a new object based on obj1 and obj2
|
514 | 512 | */
|
515 | 513 | function _mergeOptions(obj1,obj2) {
|
516 |
| - var obj3 = {}, |
517 |
| - attrname; |
518 |
| - for (attrname in obj1) { obj3[attrname] = obj1[attrname]; } |
519 |
| - for (attrname in obj2) { obj3[attrname] = obj2[attrname]; } |
| 514 | + var obj3 = {}; |
| 515 | + for (var attrname in obj1) { obj3[attrname] = obj1[attrname]; } |
| 516 | + for (var attrname in obj2) { obj3[attrname] = obj2[attrname]; } |
520 | 517 | return obj3;
|
521 | 518 | }
|
522 | 519 |
|
|
0 commit comments