开发者

Jquery/javascript problem in chrome

开发者 https://www.devze.com 2023-03-16 04:34 出处:网络
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,

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

精彩评论

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