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)
精彩评论