Chris Domigan  wrote:

> I keep all my behaviours in separate functions. For instance if I had a
> fancy table widget I'd have a function called initTable() that contained
> the behaviour code. I'd call it initially upon page load, then call it
> again when necessary if content has been updated via ajax.

Thanks for the suggestion. This will work and is a fine stragety on a single 
custom site. The problem is that you have to know precisely what behavious 
exist and need attaching. In e.g., Drupal, a particular site may have any of 
dozens of behaviours on any given page (each written by a different 
developer and each with a separate attach function). Hence the need for a 
method of tracking the available behaviours. Likely this will begin with 
what you're doing, but add a couple of pieces: registering the behaviours, 
calling all registered behaviours. 


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to