usablica/intro.js — pull request #375 by rnicholus (2014-11-27 16:33:56+00:00)
Title: Feature/element late binding

This simple adjustment allows a function to be specified for an `element` property on a `step` object. This allows for the element to be shown in the next/pending step to be evaluated as late as possible to account for dynamically rendered/added elements that are part of a tour.

The default behavior of introjs seems to involve resolving all element selectors into `HTMLElement`s before the tour begins. This doesn't work well with SPA and pages where elements are added after the DOM has loaded.

We are currently making use of this in an internal project, and this change appears to be necessary to properly include angular directives in the tour that contain contain elements that are conditionally rendered based on some async task result (ajax request, for example).

If there is anything that I can adjust here to make this more suitable (if it isn't suitable already), let me know.