How to re-run javascript core code for content loaded with jQuery's ajax()?
Looks like Drupal.attachBehaviors(jQuery("#content")[0]); is working. Some issues still exist though. Like the absence of relevant behaviors when loading from different page.

Taken from https://drupal.stackexchange.com/a/3193/7177