File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed
Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,15 @@ test("content: return string", function() {
2323 same ( $ ( ".ui-tooltip" ) . text ( ) , "customstring" ) ;
2424} ) ;
2525
26+ test ( "content: return jQuery" , function ( ) {
27+ $ ( "#tooltipped1" ) . tooltip ( {
28+ content : function ( ) {
29+ return $ ( "<div></div>" ) . html ( "cu<b>s</b>tomstring" ) ;
30+ }
31+ } ) . tooltip ( "open" ) ;
32+ same ( $ ( ".ui-tooltip" ) . text ( ) , "customstring" ) ;
33+ } ) ;
34+
2635test ( "content: callback string" , function ( ) {
2736 stop ( ) ;
2837 $ ( "#tooltipped1" ) . tooltip ( {
Original file line number Diff line number Diff line change 2424 $ ( "#context1 a, form input, #childish" ) . tooltip ( ) ;
2525
2626 // custom class, replaces ui-widget-content
27- $ ( "#context2 [title]" ) . tooltip ( {
28- tooltipClass : "ui-widget-header"
29- } ) ;
30- $ ( "#right1" ) . tooltip ( {
31- tooltipClass : "ui-state-error"
32- } ) ;
27+ $ ( "#context2 [title]" ) . tooltip ( ) . each ( function ( ) {
28+ $ ( this ) . tooltip ( "widget" ) . addClass ( "ui-widget-header" ) ;
29+ } )
30+ $ ( "#right1" ) . tooltip ( ) . tooltip ( "widget" ) . addClass ( "ui-state-error" ) ;
3331
3432 // synchronous content
3533 $ ( "#see-footnote" ) . tooltip ( {
6967 my : "center top" ,
7068 at : "center bottom" ,
7169 offset : "0 10"
72- } ,
73- tooltipClass : "ui-state-highlight"
74- } ) ;
70+ }
71+ } ) . tooltip ( "widget" ) . addClass ( "ui-state-highlight" ) ;
7572
7673 var positionOnTop = {
7774 position : {
You can’t perform that action at this time.
0 commit comments