Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Popover/tooltip selector option needs documentation #4215
The documentation for the selector option for popovers and tooltips currently states "if a selector is provided, tooltip objects will be delegated to the specified targets". This description is not very helpful and appears to confuse a good number of people, including myself until I figured out what it actually does (also see #2091).
Explanation: 'selector' is used internally in conjunction with jQuery.on in order to allow markup dynamically inserted in the DOM, to trigger tooltips and popovers. I've created an interactive jsFiddle illustrating its usage: http://jsfiddle.net/KPeKS/4/
tl;dr: selector = jQuery.on support
I therefore propose that the documentation be improved, making note that 'selector' makes the plugins use jQuery.on and a short explanation of what that does, for those who may not be familiar with the function, along with the following sample code:
Read somewhere that jquery now suggests attaching ".on" to the document. (instead of the body as in this thread)
So you might try...
It seems to work for me. (although admittedly didn't spend a lot of time on this)