开发者

Jquery/javascript problem in chrome

im trying to do some processing on close event of jquery multiselect plugin by erichynds

the problem is chrome seems to get lost in the following loop,

   for(var a in f)
   {    
    var h = f[a开发者_StackOverflow社区];
    $('#modelselect0 optgroup[label='+h+']').each(function(e){         
     var opt = $(this).find('option').filter(':selected');  
     if(opt.length !=0)
     {      
     opt.each(function(){     
      var tempIndex = tt.indexOf(h);       
      if(ff.length!=0)
      {
       ff += ","+$(this).text();
      }
      else
      {
       ff=$(this).text();
      }      
      });     
     }
     else
     {     
      if(ff.length!=0)
      {
       ff += ","+h;
      }
      else
      {
       ff=h;
      }     
     }     
   });    
   }

works fine in FF, opera.

any help is appreciated.


try changing:

for(var a in f)

to:

var a;
for(a in f)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜