Bootstrap click the blank pover pop-up box to hide the instance and bootstrappover
Code:
<Div> <a class = "btn-success show" title = "Popover title" data-container = "body" data-toggle = "popover" data-placement = "bottom "data-content =" some content in Popover at the bottom "> aaaa </a> </div> <script >$ (function () {initPopover () ;}) function initPopover () {$ (". show "). popover ({container: "body", trigger: "manual" // manually triggered }). on ('Show. bs. popover ', function () {$ (this ). addClass ("popover_open ");}). on ('hide. bs. popover ', function () {$ (this ). removeClass ("popover_open") ;}); $ (". show "). click (function () {if ($ (this ). hasClass ("popover_open") {$ (this ). popover ("hide")} else {$ (". popover_open "). popover ("hide"); $ (this ). popover ("show");} var e = arguments. callee. caller. arguments [0] | event; e. stopPropagation () ;}); $ (document ). click (function () {$ (". show "). popover ("hide") ;}}</script>
Note:
1. Not applicable to buttons, a, img, etc.
2. show. bs. popover: this event is triggered immediately when the show instance method is called.
Shown. bs. popover: this event is triggered when the pop-up dialog box is complete (it will wait until the CSS transition effect is complete ).
Hide. bs. popover: this event is triggered immediately when the hide instance method is called.
Hidden. bs. popover: this event is triggered when the tooltip is completely hidden (it will wait until the CSS transition effect is completed ).
3. Introduce jquery and bootstrap header files
4. Cancel bubbling
In the above bootstrap example, click the popover pop-up box in the blank space to hide all the content shared by the editor. I hope to give you a reference and support for the help house.