|
141 | 141 | /** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/ |
142 | 142 | $.jGrowl = function( m , o ) { |
143 | 143 | // To maintain compatibility with older version that only supported one instance we'll create the base container. |
144 | | - if ( $('#jGrowl').size() === 0 ) |
| 144 | + if ( $('#jGrowl').length === 0 ) |
145 | 145 | $('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body'); |
146 | 146 |
|
147 | 147 | // Create a notification on the container. |
|
308 | 308 | if ( o.corners !== '' && $.fn.corner !== undefined ) $(notification).corner( o.corners ); |
309 | 309 |
|
310 | 310 | /** Add a Global Closer if more than one notification exists **/ |
311 | | - if ($('.jGrowl-notification:parent', self.element).size() > 1 && |
312 | | - $('.jGrowl-closer', self.element).size() === 0 && this.defaults.closer !== false ) { |
| 311 | + if ($('.jGrowl-notification:parent', self.element).length > 1 && |
| 312 | + $('.jGrowl-closer', self.element).length === 0 && this.defaults.closer !== false ) { |
313 | 313 | $(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme) |
314 | 314 | .appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing) |
315 | 315 | .bind("click.jGrowl", function() { |
|
336 | 336 | }); |
337 | 337 |
|
338 | 338 | if (this.notifications.length > 0 && |
339 | | - (this.defaults.pool === 0 || $(this.element).find('.jGrowl-notification:parent').size() < this.defaults.pool) ) |
| 339 | + (this.defaults.pool === 0 || $(this.element).find('.jGrowl-notification:parent').length < this.defaults.pool) ) |
340 | 340 | this.render( this.notifications.shift() ); |
341 | 341 |
|
342 | | - if ($(this.element).find('.jGrowl-notification:parent').size() < 2 ) { |
| 342 | + if ($(this.element).find('.jGrowl-notification:parent').length < 2 ) { |
343 | 343 | $(this.element).find('.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() { |
344 | 344 | $(this).remove(); |
345 | 345 | }); |
|
0 commit comments