소스 검색

Merge pull request #345 from Polonious/master

Predictable contain id
Igor Vaynberg 12 년 전
부모
커밋
64ec0c5e89
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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