jQuery Expander plugin loses expand effect if beforeExpand callback function is defined

jQuery Expander plugin loses expand effect if beforeExpand callback function is defined

Hi, I was using the jQuery Expander plugin...love the effect but when I mapped a callback function to beforeExpand, the function and the default expandEffect only work the first time the expand link is clicked:

  1. $(document).ready(function() {
  2. $("#story p:gt(0)").expander({
  3. slicePoint: 512,
  4. widow: 4,
  5. expandText: 'more',
  6. expandPrefix: '… ',
  7. expandSpeed: '2000',
  8. userCollapseText: 'less',
  9. userCollapsePrefix: ' …',
  10. beforeExpand: function() {
  11. $("#copyright").fadeOut(200);
  12. },
  13. onCollapse: function($thisElement, byUser) {
  14. $("#copyright").fadeIn(200);
  15. }
  16. });
  17. });

Basically I want a div with id="copyright" to fade away when the text is expanded and fade back in when the text is collapsed. What happens is that everything works correctly the first time I expand the text, but then when I collapse it, div#copyright does not fade back in. Additionally, when I expand the text a second time or subsequent times, it does not fadeIn like before, but just appears. If I don't specify a beforeExpand callback function, then the expanding text fades in correctly no matter how many times I click the expand link. Any help would be greatly appreciated!

-albeeboy