1. Owen McGettrick
  2. htraf-prototype

Commits

zindel  committed c2d6d7e

fixing select issue

  • Participants
  • Parent commits e187307
  • Branches default

Comments (0)

Files changed (1)

File htraf/jquery.htraf.js

View file
  • Ignore whitespace
 
 $.fn._valOrig = $.fn.val;
 $.fn.val = function(value) {
-    var origSelector = 'input,textarea';
+    var origSelector = 'input,textarea,select';
     if(value !== undefined)
         return this.each(function() {
             if($(this).is(origSelector) || !$(this).data('htraf'))
             var row = data[i];
             select.options[i + keep] = new Option(
                 row[1] === undefined  ? row[0]:row[1], 
-                row[0] === null ? row[0]:'',
+                row[0] === null ? '':row[0],
                 i + keep == 0, i + keep == 0); 
         }
         for(var i = keep - 1; i >= 0; i--) {