23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Second, the contentElement property of the tooltip control can name another element altogether,<br />

which will be displayed when the tooltip is invoked. For example, consider this piece of hidden <strong>HTML</strong> in<br />

our markup thatcontains other controls:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

You could provide any DOM element as content, even with WinJS controls inside. The tooltip control<br />

will re-parent the element to the tooltip container, and block interaction events on that element, since that's<br />

not the suggested interaction model.<br />

<br />

<br />

<br />

<br />

<br />

We can reference it like so:<br />

<br />

My piece of data<br />

<br />

When you hover over the text (with a mouse or hover-enabled touch hardware), this tooltip will<br />

appear:<br />

148

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!