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() {
23
23
same ( $ ( ".ui-tooltip" ) . text ( ) , "customstring" ) ;
24
24
} ) ;
25
25
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
+
26
35
test ( "content: callback string" , function ( ) {
27
36
stop ( ) ;
28
37
$ ( "#tooltipped1" ) . tooltip ( {
Original file line number Diff line number Diff line change 24
24
$ ( "#context1 a, form input, #childish" ) . tooltip ( ) ;
25
25
26
26
// 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" ) ;
33
31
34
32
// synchronous content
35
33
$ ( "#see-footnote" ) . tooltip ( {
69
67
my : "center top" ,
70
68
at : "center bottom" ,
71
69
offset : "0 10"
72
- } ,
73
- tooltipClass : "ui-state-highlight"
74
- } ) ;
70
+ }
71
+ } ) . tooltip ( "widget" ) . addClass ( "ui-state-highlight" ) ;
75
72
76
73
var positionOnTop = {
77
74
position : {
You can’t perform that action at this time.
0 commit comments