PDA

View Full Version : Multiple quicktips using same contentEl



Victor Tsai
6 Sep 2011, 6:14 PM
Hi,

I try to use the example on http://dev.sencha.com/deploy/ext-4.0.2a/examples/qtips/qtips.html
(http://dev.sencha.com/deploy/ext-4.0.2a/examples/qtips/qtips.html),and make some change like:
{
id: 'content-anchor-tip',
target: 'track-tip',
autoHide: true,
contentEl: 'content-tip', // load content from the page

},{
id: 'content-anchor-tip2',
target: 'leftCallout',
autoHide: true,
contentEl: 'content-tip', // load content from the page
}

two quicktips using same contentEl,
the quicktips shows correct at the first time,but if my mouse move to the other quicktip ,then back to the first quicktip ,it shows empty,which confuse me...
here is the screen shot:
before
27905
after
27906

THX ~

skirtle
8 Sep 2011, 12:56 AM
Please use CODE tags when posting code (# button on the editor toolbar).

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.AbstractComponent-cfg-contentEl


This config option is used to take an existing HTML element and place it in the layout element of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content.

Each component is only rendered once. On rendering, each component will move the DOM element, so the last component to render will end up keeping it.