<input title="inputtitle">
<span id="multiple-describedby" aria-describedby="fixture-span" title="...">aria-describedby</span>
<span id="fixture-span" title="title-text">span</span>
- <span id="contains-tooltipped"><span id="contained-tooltipped" title="foobar">baz</span></span>
+ <span id="contains-tooltipped" title="parent"><span id="contained-tooltipped" title="child">baz</span></span>
</div>
</div>
equal( $( ".ui-tooltip" ).length, 0 );
});
+test( "nested tooltips", function() {
+ expect( 2 );
+
+ var child = $( "#contained-tooltipped" ),
+ parent = $( "#contains-tooltipped" ).tooltip({
+ show: null,
+ hide: null
+ });
+
+ parent.trigger( "mouseover" );
+ equal( $( ".ui-tooltip:visible" ).text(), "parent" );
+
+ child.trigger( "mouseover" );
+ equal( $( ".ui-tooltip" ).text(), "child" );
+});
+
}( jQuery ) );