이 스크립트는 동적으로 추가되었습니다. 그것은 타임 아웃 기능을 가지고 있으며 5 초마다 실행된다는 것을 의미합니다.DOM에서 제거한 후에도 계속 동적으로 추가 된 기능이
I가 사용 DIV이 함수를 불러
$(document).ready(function(){
(function($){
$.fn.baslatmesajlari = function() {
setInterval(function(){
console.log("I am running");
}, 5000);
return this;
};
})(jQuery);
});
$("body").baslatmesajlari();
dynamicjs.php;
$("#temporarycontent").load("dynamicjs.php");
내가
$("#temporarycontent").empty();
을 수행 할 때 스크립트는 아직 실행 중입니다. 어떻게 멈추게 할 수 있습니까?
간격을 지우는 방법을 제공해야합니다. –
도움을 청할 때 코드를 들여 쓰기 쉽게 읽을 시간을 가져주십시오. –