드래그하는 동안 드래그 가능한 요소의 속성 (글꼴 색상, 배경색, z- 색인)을 변경하고 싶습니다. 문제가 IE9인지는 모르겠지만 코드가 작동하는 특성이 있습니다. 그렇지 않은 경우도 있습니다.드래그 가능한 요소의 속성 변경 정보
$(function() {
$('.comurl').draggable({
start: function(event, ui) {
$(this).css("background-color","red"); //works
$(this).css("color","red"); //doesn't
$(this).css("z-index","999999"); //doesn't
},
stop: function(event, ui) {
$(this).css("background-color","green"); //works
$(this).css("color","green"); //doesn't
$(this).css("z-index","auto"); //doesn't
}
});
});
이러한 방식으로 등록 할 때 속성의 이름이 다른가요? IE9에 문제가 있습니까?
흥미 롭습니다 ... [JSFiddle] (http://jsfiddle.net/) 데모를 할 수 있었습니까? –
'$ (this) .css ({ "background-color": "red", "color": "red", "z-index": "999999"}); –