나는 다른 번호를 각각 계산 카운터를 만들어,하지만 난 그것을 나던 작업 ... 클래스의 모든 elemnts을 선택할 때JQuery와 각 선택 나던 작업
$(document).ready(function() {
function change() {
/*
$(".test").each(function(i,domeElement){
var theNum = parseInt(this.html())+1;
this.html(theNum);
});
*/
//this works... the other one doesnt why?!?!
var theNum = parseInt($(".test").html()) + 1;
$(".test").html(theNum);
}
setInterval(change, 1000);
});
질문에 JSFiddle에 * * 접속하지 마십시오. 항상 질문에 코드를 포함 시키십시오. – Matt