{"action":"created","issue":{"url":"https://api.github.com/repos/HubSpot/drop/issues/112","labels_url":"https://api.github.com/repos/HubSpot/drop/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/HubSpot/drop/issues/112/comments","events_url":"https://api.github.com/repos/HubSpot/drop/issues/112/events","html_url":"https://github.com/HubSpot/drop/issues/112","id":108745773,"number":112,"title":"Dynamically change \"target\" of Drop","user":{"login":"dmackerman","id":289938,"avatar_url":"https://avatars.githubusercontent.com/u/289938?v=3","gravatar_id":"","url":"https://api.github.com/users/dmackerman","html_url":"https://github.com/dmackerman","followers_url":"https://api.github.com/users/dmackerman/followers","following_url":"https://api.github.com/users/dmackerman/following{/other_user}","gists_url":"https://api.github.com/users/dmackerman/gists{/gist_id}","starred_url":"https://api.github.com/users/dmackerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmackerman/subscriptions","organizations_url":"https://api.github.com/users/dmackerman/orgs","repos_url":"https://api.github.com/users/dmackerman/repos","events_url":"https://api.github.com/users/dmackerman/events{/privacy}","received_events_url":"https://api.github.com/users/dmackerman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-28T21:00:26Z","updated_at":"2015-09-28T21:22:04Z","closed_at":null,"body":"First off, fantastic library. It's been a huge convenience.\r\n\r\nI think I have a fairly unique scenario, where I'm building a \"wizard\" of sorts. I have an array of objects which define my \"steps\". Each step has a `selector` which works beatifully, and for each step, I create a `Drop` instance. I open and close them manually and all is well.\r\n\r\nThe rub is that some of these `selector`'s aren't available when the DOM first loads, due to the dynamic nature of the the way we want the wizard to work. I figured a nice solution for getting around this would be to define some of the steps as `async`, and then dynamically assign the `target` on the `Drop` instances when the time comes. \r\n\r\nIf `async` is true on the step, I default the target to `document.querySelector('body')` so I can change it later.\r\n\r\nSome code looks like:\r\n\r\n```js\r\nif (popover.options.async) {\r\n    popover.options.target = $(`[data-wizard-step='${popover.options.selector}']`)[0];\r\n    popover.position();\r\n}\r\n\r\npopover.open();\r\n```\r\n\r\nThe DOM node gets targeted properly, but it appears that `position()` doesn't do anything, and the call to `open()` doesn't open the drop. The drop does actually get rendered in the DOM, but the positioning is wrong. It appears it's still using the `body` query selector that I'm trying to override.\r\n\r\nIs dynamic \"re-targeting\" a supported feature?\r\n\r\nThanks again!"},"comment":{"url":"https://api.github.com/repos/HubSpot/drop/issues/comments/143878146","html_url":"https://github.com/HubSpot/drop/issues/112#issuecomment-143878146","issue_url":"https://api.github.com/repos/HubSpot/drop/issues/112","id":143878146,"user":{"login":"dmackerman","id":289938,"avatar_url":"https://avatars.githubusercontent.com/u/289938?v=3","gravatar_id":"","url":"https://api.github.com/users/dmackerman","html_url":"https://github.com/dmackerman","followers_url":"https://api.github.com/users/dmackerman/followers","following_url":"https://api.github.com/users/dmackerman/following{/other_user}","gists_url":"https://api.github.com/users/dmackerman/gists{/gist_id}","starred_url":"https://api.github.com/users/dmackerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmackerman/subscriptions","organizations_url":"https://api.github.com/users/dmackerman/orgs","repos_url":"https://api.github.com/users/dmackerman/repos","events_url":"https://api.github.com/users/dmackerman/events{/privacy}","received_events_url":"https://api.github.com/users/dmackerman/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T21:22:04Z","updated_at":"2015-09-28T21:22:04Z","body":"Yeah, good idea. I looked at the code and realized that `position()` just calls Tether's position, which does support \"re-targetting\" AFAIK. Is that correct?"}}