-1
의 전환 DIV 클래스 이름 난 두 DIV 클래스가 : 데모 1 할을 demo2하는 데모 1과 demo2 : 데모 1 및 demo2JQuery와 : 매 초마다
<div class="demo1">example text</div>
내가 모든 두 번째로 DIV 클래스 이름을 변경할 수 있습니다 어떻게 그렇게
을
의 전환 DIV 클래스 이름 난 두 DIV 클래스가 : 데모 1 할을 demo2하는 데모 1과 demo2 : 데모 1 및 demo2JQuery와 : 매 초마다
<div class="demo1">example text</div>
내가 모든 두 번째로 DIV 클래스 이름을 변경할 수 있습니다 어떻게 그렇게
을
jQuery(function() {
var $div = $('.demo1');
setInterval(function() {
$div.toggleClass('demo1 demo2');
}, 1000);
})
데모에 사용 toggleClass() : Fiddle
가능한 복제본 [jQuery에서 두 클래스 사이를 전환] (http://stackoverflow.com/questions/1644545/toggle-between-two-classes-in-jquery) – martynas