 <p>You could set a variable outside this code:</p> <pre><code>var clickedCarousel = false; $esCarousel.show().elastislide({ imageW : 240, onClick : function( $item ) { if( anim ) return false; anim = true; // only in the FIRST CLICK click show wrapper (expected but don't work) if(!clickedCarousel) { _addImageWrapper(); clickedCarousel = true; } // on click show image _showImage($item); // change current current = $item.index(); } }); </code></pre> <p>Does this fit your need?</p> <p><strong>UPDATE:</strong> Regarding this update:</p> <p>UPDATE: When I close (close with fadeOut) It won't open again! It must be because the carousel is already been clicked… how can I “reset” the click?</p> <p><a href="http://api.jquery.com/fadeOut/" rel="nofollow">fadeOut()</a> takes a callback of this form:</p> <pre><code>obj.fadeOut( [duration] [, callback] ) </code></pre> <p>callback can be an inline function or a predefined one, so you could use this (inline):</p> <pre><code>$navClose.on('click.rgGallery', function( event ) { $('.rg-image-wrapper').fadeOut(2000,function(){ clickedCarousel = false; // reset to false after fade out is complete }); return false; }); </code></pre> <p>Does that help?</p>