Prechádzať zdrojové kódy

consistent containid for better integration with form validation.

TedLiang 12 rokov pred
rodič
commit
881d2fabd3
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -559,7 +559,7 @@
             this.enabled=true;
             this.container = this.createContainer();
 
-            this.containerId="s2id"+nextUid();
+            this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
             this.container.attr("id", this.containerId);
 
             // cache the body so future lookups are cheap