From 775e3ca89a2489b508e76497e14ffea2fb0d23c9 Mon Sep 17 00:00:00 2001 From: Scott Date: Fri, 13 Jul 2018 16:07:21 +0200 Subject: [PATCH] Update tooltip.md I've added some explanation from here thanks to pdanpan. Please make sure it is right. I am sooo rusty now. :smile: Scott --- source/components/tooltip.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/source/components/tooltip.md b/source/components/tooltip.md index 82d88d4c..84aaa068 100644 --- a/source/components/tooltip.md +++ b/source/components/tooltip.md @@ -34,8 +34,36 @@ You can replace QBtn and the QPopover content with any DOM elements or component The idea is to place QTooltip inside your DOM element / component (as **direct child in DOM hierarchy**), when you want it to be the trigger for the QTooltip. Don't worry about QTooltip content inheriting CSS from the container. This won't occur, since QTooltip will be injected as a direct child of ``. +With that in mind, if you want to have a tooltip for say, a rating component, it is best to wrap the component in a ´div´ and add the tool tip as a child of the ´div . Note: this isn't necessary for buttons, as ´QBtn´ is built to support Tooltips. + +``` html + + + +``` +You can also use `v-model`and Vue's event system to toggle, show or hide the Tooltip on certain events. + ## Toggle through v-model -``` html +``` html