[jQuery] each break/continue

2015. 1. 22. 15:56
반응형

jQuery each break/continue

$.each(giftInfo, function(i) {
    if(giftInfo[i].ORD_PSS_QTY <=0) { 	
        alert(J.getMessage("ord.warning.028", [giftInfo[i].PRD_NM])); 	
        //freeGift Stock check 	
        $(location).attr("href", "${refURL}"); 	
            flag = false; 	
            return false;  //break each loop 빠져나옴         
            return true;   //continue each loop 계속 수행									     
        } 
    }
);
반응형

+ Recent posts