PDA

View Full Version : [2.0] quicktip content reuse


seade
01-13-2008, 06:13 PM
I am a big fan of setting up quicktips using the qtip attribute - it is just so convenient.

One problem I do find frustrating however is that the tip needs to be registered on the top level element in order to be displayed (see http://extjs.com/forum/showthread.php?t=4329).

Moving the qtip to the top level element is trivial for the example in the thread mentioned above, but it does not cater for situations like this:
<div ext:qtitle="QuickTip Title" ext:qtip="QuickTip Body...">
some content here that I want to trigger the qtip
<div>some more content in a child div that I want to trigger the same qtip (as configured here the quicktip is NOT shown for this div)
</div>
</div>or this:
<div ext:qtitle="QuickTip Title" ext:qtip="QuickTip Body...">
some content here that I want to trigger the qtip
</div>
<div>some more content in a sibling div that I want to trigger the same qtip
</div>
I could put the qtip on both divs, but this would increase the size of the page a little. Nicer would be if I could somehow refer to the previous qtip, either by some relationship or id. I am thinking along the lines of an attribute like qtipid being used to refer to the qtip registered on another element thus:
<div id="myQtipEl1" ext:qtitle="QuickTip Title" ext:qtip="QuickTip Body...">
some content here that I want to trigger the qtip
</div>
<div ext:qtipid="myQtipEl1">some more content in a sibling div that I want to trigger the qtip from the preceding element.
</div>
Obviously I could achieve something like this (well for the content body anyway) by registering the QuickTip objects in script and using contentEl, but this would be nowhere near as compact and convenient.

Cheers,

Scott