Skip to content

Instantly share code, notes, and snippets.

@robballou
Created July 27, 2012 19:23
Show Gist options
  • Save robballou/3189989 to your computer and use it in GitHub Desktop.
Save robballou/3189989 to your computer and use it in GitHub Desktop.
Re-attaching Drupal behaviors to an element
// remove the ajax-processed class from the element so that
// attachBehaviors() will update the element
$('#my-element-id').removeClass('ajax-processed');
// now re-attach the behaviors to this element
Drupal.attachBehaviors($('#my-element-id'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment