@@ -135,6 +135,7 @@ function jBoxWrapper(jQuery) {
135
135
onPosition : null , // Fired when jBox is positioned
136
136
onCreated : null , // Fired when jBox is created and availible in DOM
137
137
onOpen : null , // Fired when jBox opens
138
+ onOpenComplete : null , // Fired when jBox is completely open (when fading is finished)
138
139
onClose : null , // Fired when jBox closes
139
140
onCloseComplete : null , // Fired when jBox is completely closed (when fading is finished)
140
141
onDragStart : null , // Fired when dragging starts
@@ -798,6 +799,7 @@ function jBoxWrapper(jQuery) {
798
799
var translate = position ? item [ 1 ] . replace ( '%XY' , this . _getXY ( position ) . toUpperCase ( ) ) : item [ 1 ] ;
799
800
animations [ this . options . animation [ ev ] ] . positions && ( translate = translate . replace ( '%V' , animations [ this . options . animation [ ev ] ] . positions [ position ] [ item [ 0 ] ] ) ) ;
800
801
keyframe_css += item [ 0 ] + ' {transform:' + translate + ';}' ;
802
+
801
803
} . bind ( this ) ) ;
802
804
keyframe_css += '}' ;
803
805
@@ -1744,6 +1746,9 @@ function jBoxWrapper(jQuery) {
1744
1746
this . isOpening = true ;
1745
1747
this . wrapper . css ( { display : 'block' } ) ;
1746
1748
} . bind ( this ) ,
1749
+ complete : function ( ) {
1750
+ this . _fireEvent ( 'onOpenComplete' ) ;
1751
+ } . bind ( this ) ,
1747
1752
always : function ( ) {
1748
1753
this . isOpening = false ;
1749
1754
@@ -1754,6 +1759,7 @@ function jBoxWrapper(jQuery) {
1754
1759
} else {
1755
1760
this . wrapper . css ( { display : 'block' , opacity : 1 } ) ;
1756
1761
this . positionOnFadeComplete && this . position ( ) && ( this . positionOnFadeComplete = false ) ;
1762
+ this . _fireEvent ( 'onOpenComplete' ) ;
1757
1763
}
1758
1764
}
1759
1765
} . bind ( this ) ;
0 commit comments