Browse Source

#1260 closes #1252 fixes #992 - retrieve option text as value when value is not defined

Igor Vaynberg 12 years ago
parent
commit
62e0ae6004
3 changed files with 3 additions and 3 deletions
  1. 1 1
      component.json
  2. 1 1
      select2.jquery.json
  3. 1 1
      select2.js

+ 1 - 1
component.json

@@ -3,6 +3,6 @@
     "version": "3.3.2",
     "version": "3.3.2",
     "main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"],
     "main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"],
     "dependencies": {
     "dependencies": {
-        "jquery": ">= 1.4.4"
+        "jquery": ">= 1.7.1"
     }
     }
 }
 }

+ 1 - 1
select2.jquery.json

@@ -31,6 +31,6 @@
     "docs": "http://ivaynberg.github.com/select2/",
     "docs": "http://ivaynberg.github.com/select2/",
     "download": "https://github.com/ivaynberg/select2/tags",
     "download": "https://github.com/ivaynberg/select2/tags",
     "dependencies": {
     "dependencies": {
-        "jquery": ">=1.4.4"
+        "jquery": ">=1.7.1"
     }
     }
 }
 }

+ 1 - 1
select2.js

@@ -739,7 +739,7 @@ the specific language governing permissions and limitations under the Apache Lic
         optionToData: function(element) {
         optionToData: function(element) {
             if (element.is("option")) {
             if (element.is("option")) {
                 return {
                 return {
-                    id:element.attr("value"),
+                    id:element.prop("value"),
                     text:element.text(),
                     text:element.text(),
                     element: element.get(),
                     element: element.get(),
                     css: element.attr("class"),
                     css: element.attr("class"),