diff --git a/frontends/default/javascripts/jquery/active_scaffold.js b/frontends/default/javascripts/jquery/active_scaffold.js
index <HASH>..<HASH> 100644
--- a/frontends/default/javascripts/jquery/active_scaffold.js
+++ b/frontends/default/javascripts/jquery/active_scaffold.js
@@ -622,7 +622,7 @@ var ActiveScaffold = {
     if (typeof(element) == 'string') element = '#' + element;
     var element = $(element);
     if (options.singular == false) {
-      if (!(options.id && $(options.id))) {
+      if (!(options.id && $('#' + options.id).size() > 0)) {
         element.append(content);
       }
     } else {
Bugfix: jquery create-associated_record_form used prototype code; issue
<I> reported by clyfe