File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 5555 tooltipClass : "ui-state-highlight"
5656 } ) ;
5757
58- $ ( "#button1" ) . button ( ) . tooltip ( ) ;
58+ var positionOnTop = {
59+ position : {
60+ my : "center bottom" ,
61+ at : "center top" ,
62+ offset : "0 -5"
63+ }
64+ } ;
65+ $ ( "#button1" ) . button ( ) . tooltip ( positionOnTop ) ;
5966 $ ( "#button2" ) . button ( {
6067 icons : {
6168 primary : "ui-icon-wrench"
6269 }
63- } ) . tooltip ( ) ;
64- $ ( "#button3" ) . button ( {
70+ } ) . tooltip ( positionOnTop ) ;
71+ $ ( "#button3, #button4 " ) . button ( {
6572 icons : {
6673 primary : "ui-icon-wrench"
6774 } ,
6875 text : false
69- } ) . tooltip ( ) ;
76+ } ) . tooltip ( positionOnTop ) ;
7077 }
7178 enable ( ) ;
7279
136143
137144 < button id ="button1 " title ="Button Tooltip "> Button Label</ button >
138145 < button id ="button2 " title ="Icon Button "> Button with Icon</ button >
139- < button id ="button3 "> Icon Only Button</ button >
146+ < button id ="button3 "> Icon Only Button 1</ button >
147+ < button id ="button4 "> Icon Only Button 2</ button >
140148
141149 < div id ="footnote "> This is < strong > the</ strong > footnote, including other elements</ div >
142150
143151 < button id ="disable "> Toggle disabled</ button >
144152 < button id ="toggle "> Toggle widget</ button >
145153</ div >
146154
155+ < div style ="height: 2000px "> </ div >
147156
148157</ body >
149158</ html >
Original file line number Diff line number Diff line change @@ -104,9 +104,9 @@ $.widget("ui.tooltip", {
104104 this . tooltip . css ( {
105105 top : 0 ,
106106 left : 0
107- } ) . position ( $ . extend ( this . options . position , {
107+ } ) . show ( ) . position ( $ . extend ( this . options . position , {
108108 of : target
109- } ) ) ;
109+ } ) ) . hide ( ) ;
110110
111111 this . tooltip . attr ( "aria-hidden" , "false" ) ;
112112 target . attr ( "aria-describedby" , this . tooltip . attr ( "id" ) ) ;
You can’t perform that action at this time.
0 commit comments