$(function(){
$('.refresh').click(function(event) {
event.preventDefault();
$.ajax({
url: "_js/data.php",
success: function(results){
$('#listdata').replaceWith(results);
}
});
});
});
스크립트에 listData DIV에의 내용을 교체하려면 다음 jQuery를 사용하고
작업하는 온 수많은 링크에 의해 트리거됩니다 다음과 같은 페이지 :
<a href="" id="update1" class="refresh">Update 1</a>
<a href="" id="update2" class="refresh">Update 2</a>
어떤 이유로 스크립트는 링크의 첫 번째 클릭에서만 작동합니다. 이후 클릭은 데이터를 새로 고치지 않습니다.
나는 여러 가지 수정 사항을 보았지만 아무 것도 얻을 수 없었다. 어떤 제안?
라이브 호? ... –