diff options
Diffstat (limited to 'misc/teaser.js')
-rw-r--r-- | misc/teaser.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/misc/teaser.js b/misc/teaser.js index c59a92e55..0aa512901 100644 --- a/misc/teaser.js +++ b/misc/teaser.js @@ -5,9 +5,9 @@ * * Note: depends on resizable textareas. */ -Drupal.teaserAttach = function() { - $('textarea.teaser:not(.joined)').each(function() { - var teaser = $(this).addClass('joined'); +Drupal.behaviors.teaser = function(context) { + $('textarea.teaser:not(.teaser-processed)', context).each(function() { + var teaser = $(this).addClass('teaser-processed'); // Move teaser textarea before body, and remove its form-item wrapper. var body = $('#'+ Drupal.settings.teaser[this.id]); @@ -75,7 +75,3 @@ Drupal.teaserAttach = function() { }); }; - -if (Drupal.jsEnabled) { - $(document).ready(Drupal.teaserAttach); -} |