title: Bind / Unbind inside callback
body: <p>I'm having all sorts of problems from the crap browser that I can't seem to overcome with anything I've read. Here's the situation... I'm using a third party plugin to generate a gallery. This plugin comes with a callback on picture change that fires each time the image is changed. </p>
  
  <p>What i'm trying to do is add the css for two div's... one that is a wrapper div which will slide out when the child div is clicked and slide back in when the child is clicked again. </p>
  
  <p>Here's the callback:</p>
  
  <pre><code>        changepicturecallback: function(){
                      $('.sxpp_commentsImage').unbind(toggle);
      oldWidth = $('.pp_pic_holder').width() - 20,
      newWidth = $('.pp_pic_holder').width() + (200),
      newHeight = $('.pp_hoverContainer').height(),
      cImageAlign = newWidth - 20;
  
                  var toggle = function() {
                     if(newWidth == $('.sxpp_comments').width()){
                          $('.sxpp_comments').animate({width: oldWidth});
                              }else{
                          $('.sxpp_comments').animate({width: newWidth});
                      }
                  }
  
              $('.sxpp_comments').width(oldWidth).css('background-color','red'); 
        $('.sxpp_commentsImage').css({'float':'right','background-color':'green','width':'20px','height':newHeight});     
              $('.sxpp_commentsImage').bind('click',toggle);      
    }
  </code></pre>
  
  <p>This works perfectly fine in FF4 &amp; Chrome...however, it's as if the "bind" isn't happening in Internet Explorer. I've been reading up on the ".live" &amp; ".delegate" methods but (A) I'm not familiar with how they work (B) If it's possible to clear that ".live" on the change then add it back as I'm doing with the bind. </p>
  
  <p>Any insight or things I might be overlooking??</p>
  
  <p>Edit***... The divs are created dynamically (a lightbox is shown) when a link is clicked. So the from all I'm reading... the bind event is the wrong route to go anyhow. </p>