We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c30df7c commit c1bf5feCopy full SHA for c1bf5fe
intro.js
@@ -294,12 +294,22 @@
294
backdrop = null;
295
}
296
297
+ function isFunction(value){
298
+ return (typeof value) === 'function';
299
+ }
300
+
301
function showStep(step){
302
var _showStep = function(){
303
+ var element;
304
hint = hint || new Hint();
305
backdrop = backdrop || createBackdrop();
306
- hint.setTarget(step.element || $('body'));
307
+ if(isFunction(step.element)){
308
+ element = step.element();
309
+ }else{
310
+ element = step.element;
311
312
+ hint.setTarget(element || $('body'));
313
hint.setPosition(step.hintPosition);
314
hint.setTooltipPosition(step.tooltipPosition);
315
hint.setContent(step.intro);
0 commit comments