Skip to content

Commit 50a6ee2

Browse files
committed
Merge pull request #38 from josepsanzcamp/master
Replaced all .size() by .length to do compatible with the last jquery devel code
2 parents 29ba526 + 862140c commit 50a6ee2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

jquery.jgrowl.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
/** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/
142142
$.jGrowl = function( m , o ) {
143143
// 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 )
145145
$('<div id="jGrowl"></div>').addClass( (o && o.position) ? o.position : $.jGrowl.defaults.position ).appendTo('body');
146146

147147
// Create a notification on the container.
@@ -308,8 +308,8 @@
308308
if ( o.corners !== '' && $.fn.corner !== undefined ) $(notification).corner( o.corners );
309309

310310
/** 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 ) {
313313
$(this.defaults.closerTemplate).addClass('jGrowl-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme)
314314
.appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
315315
.bind("click.jGrowl", function() {
@@ -336,10 +336,10 @@
336336
});
337337

338338
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) )
340340
this.render( this.notifications.shift() );
341341

342-
if ($(this.element).find('.jGrowl-notification:parent').size() < 2 ) {
342+
if ($(this.element).find('.jGrowl-notification:parent').length < 2 ) {
343343
$(this.element).find('.jGrowl-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
344344
$(this).remove();
345345
});

0 commit comments

Comments
 (0)