Is there any kind of reasons (performance, memory, or otherwise) why I'd be better off just binding them once rather than undbinding and then redbinding the events?
On Jul 11, 2:36 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > Here is a question though...with the message box (which contains the > > buttons I'm binding events to), I am essentially just displaying and > > hiding it...not creating and deleting it. If I were to completely > > remove it from the page would I need to rebind the events? > > You would need to bind them since handlers are lost when elements are > removed from the DOM (if removed via jQuery). So you can either bind > your buttons one time, or if it's easier, just do this each time: > > $('.myButtons').unbind().click(function() { > // handler code here > > });