develop/java script

js 테이블 병합

hybr1d 2020. 6. 18. 15:29
function genRowspan(className){
	$("." + className).each(function() {
		let rows = $("." + className + ":contains('" + $(this).text() + "')");
		if (rows.length > 1) {
			rows.eq(0).attr("rowspan", rows.length);
			rows.not(":eq(0)").remove();
		}
	});
}