File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 222
222
* @param {Object } targetElement
223
223
*/
224
224
function _showElement ( targetElement ) {
225
-
225
+
226
+ if ( typeof this . _introChangeCallback !== 'undefined' ) {
227
+ this . _introChangeCallback . call ( this , targetElement ) ;
228
+ }
229
+
226
230
var self = this ,
227
231
oldHelperLayer = document . querySelector ( ".introjs-helperLayer" ) ,
228
232
elementPosition = _getOffset ( targetElement ) ;
531
535
} ,
532
536
exit : function ( ) {
533
537
_exitIntro . call ( this , this . _targetElement ) ;
538
+ } ,
539
+ onchange : function ( providedCallback ) {
540
+ if ( typeof ( providedCallback ) === "function" ) {
541
+ this . _introChangeCallback = providedCallback ;
542
+ } else {
543
+ throw new Error ( "Provided callback for onchange was not a function." ) ;
544
+ }
534
545
return this ;
535
546
} ,
536
547
oncomplete : function ( providedCallback ) {
You can’t perform that action at this time.
0 commit comments