Tether to elements that haven't been inserted into the DOM
The title says it all. Is there a way that I can tether to an element that has yet to be inserted into the DOM. My usecase for this is I'm creating backbone views and attaching an element to them. This element may/may not be inserted into the DOM as I'm initializing the view. I want to be able to setup all my tooltip logic in the initialize function of each view, and then when the elements are put into the DOM, everything should just work. Here is the relevant codepen to explain http://codepen.io/jayd3e/pen/kLiKF.
It appears this is possible if I remove this else statement https://github.com/HubSpot/drop/blob/master/drop.js#L1618. What is the purpose of that?
why can't you just use event delegation and generate the tether and link it to the element using jQuery data method, so later the tether object would be cached, so you won't need to generate it again, only enable/disable it. This is what I do.
Its still not clear how this is supposed to work... @yairEO can you provide an example?