[jQuery] multi element each

2015. 3. 31. 15:23
반응형

다중 each index, value 출력

var fnLoadSetGoodLayer = function(paramJson){
  $.each($("#"+paramJson.goods_no).find("[id='set_goods_nm']"), function(i, goods_nm){
     $.each($("#"+paramJson.goods_no).find("[id='set_cmps_qty']"), function(j, cmps_qty){
        if(i == j){
         console.log($(goods_nm).val() + " " + $(cmps_qty).val());
        };
     });
  });
}

 

반응형

+ Recent posts