File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 203203 return this . getTarget ( ) . find ( '.' + pluginClass + '-content' ) ;
204204 } ,
205205 getTitle :function ( ) {
206- return this . options . title || this . $element . attr ( 'data-title' ) || this . $element . attr ( 'title' ) ;
206+ return this . $element . attr ( 'data-title' ) || this . options . title || this . $element . attr ( 'title' ) ;
207207 } ,
208208 getUrl :function ( ) {
209- return this . options . url || this . $element . attr ( 'data-url' ) ;
209+ return this . $element . attr ( 'data-url' ) || this . options . url ;
210210 } ,
211211 getDelayShow :function ( ) {
212- return this . options . delay . show || this . $element . attr ( 'data-delay-show' ) || 0 ;
212+ var dataAttr = this . $element . attr ( 'data-delay-show' ) ;
213+ if ( typeof ( dataAttr ) !== 'undefined' ) {
214+ return dataAttr
215+ }
216+ return this . options . delay . show || 0 ;
213217 } ,
214218 getHideDelay :function ( ) {
215- return this . options . delay . hide || this . $element . attr ( 'data-delay-hide' ) || 300 ;
219+ var dataAttr = this . $element . attr ( 'data-delay-hide' ) ;
220+ if ( typeof ( dataAttr ) !== 'undefined' ) {
221+ return dataAttr
222+ }
223+ return this . options . delay . hide || 300 ;
216224 } ,
217225 getConstrains :function ( ) {
218- return this . options . constrains || this . $element . attr ( 'data-contrains' ) ;
226+ var dataAttr = this . $element . attr ( 'data-contrains' ) ;
227+ if ( typeof ( dataAttr ) !== 'undefined' ) {
228+ return dataAttr
229+ }
230+ return this . options . constrains ;
219231 } ,
220232 setTitle :function ( title ) {
221233 var $titleEl = this . getTitleElement ( ) ;
You can’t perform that action at this time.
0 commit comments