From 881d2fabd35ed10b475e8d375c7093f4079e7d8b Mon Sep 17 00:00:00 2001 From: TedLiang Date: Sat, 18 Aug 2012 15:32:28 +1000 Subject: [PATCH] consistent containid for better integration with form validation. --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index cbd10fff..76e984d0 100755 --- a/select2.js +++ b/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