The plugin cannot tell you that this happened, but I changed the plugin so that you do it.
My change in the plugin was to add a callback function (you can specify one of the parameters) to start after the animation is complete.
Here is an example
The only change is to provide a function to call when it enters or exits. So
$(function(){ $('.slide-out-div').tabSlideOut({ tabHandle: '.handle', //class of the element that will become your tab pathToTabImage: 'http://wpaoli.building58.com/wp-content/uploads/2009/09/contact_tab.gif', //path to the image for the tab //Optionally can be set using css imageHeight: '122px', //height of tab image //Optionally can be set using css imageWidth: '40px', //width of tab image //Optionally can be set using css tabLocation: 'left', //side of screen where tab lives, top, right, bottom, or left speed: 300, //speed of animation action: 'click', //options: 'click' or 'hover', action to trigger animation topPos: '200px', //position from the top/ use if tabLocation is left or right leftPos: '20px', //position from left/ use if tabLocation is bottom or top fixedPosition: false, //options: true makes it stick(fixed position) on scroll onSlideOut: function() { alert('Opened'); }, onSlideIn: function() { alert('Closed'); } }); });
Note that you will need to use version I changed to JsFiddle.
Hope this helps
UPDATE
Op requested more information about my changes to the plugin.
First, I added that I added two new properties to the default settings, which were empty functions.
onSlideOut: function() {}, onSlideIn: function() {}
Then I put this value in the callback of the animation method in the code.
//Square Bracket for emphasis only obj.animate({top:'-' + properties.containerHeight}, settings.speed,[settings.onSlideIn]).removeClass('open'); obj.animate({top:'-3px'}, settings.speed,[settings.onSlideOut]).addClass('open');
The user can then provide his own implementation of the method to override the default value.
If you need more hooks to handle the code, you might consider shooting and listening to user events instead of using callbacks.