Commits

Anonymous committed c2d6d7e

fixing select issue

Comments (0)

Files changed (1)

htraf/jquery.htraf.js

 
 $.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--) {