2012-06-14 4 views
1

나는 내가 여기에 주변 검색을 발견 수정의 몇 가지 시도했지만 그들은 내가 36 문자 식별자가, 문자열이나 숫자를 얻고있다JQuery와 문제 : 예상 식별자

... 그래서 작업을하지 않는 것 그래서 개폐 브래킷. 나는

if (($('#attachment_asset').length) && ($('p.please-wait').length == 0)) { 
    $('.buttons').append($('<p/>', { 
     class: 'please-wait', 
     text: 'Please wait, uploading your file...' 
    })); 
} 

어디서나 잘 작동하는 것 같다 ... 따옴표 변화없이 모든 작은 따옴표를 replaicing하지만 IE ...

답변

4

말씀 classseems to be reserved in IE 시도. 따옴표로 묶으십시오.

$('.buttons').append($('<p/>', { 
    "class": 'please-wait', 
    text: 'Please wait, uploading your file...' 
})); 
+0

우수한보십시오! 감사. –

0

아무런 문제가 없습니다.

파일의 다른 내용을 조합하여 문제가 발생했습니다. 전체 파일을 게시하십시오. 이것은 ie9에서 정상적으로 작동합니다.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
    <title> New Document </title> 
    <meta name="Generator" content="EditPlus"> 
    <meta name="Author" content=""> 
    <meta name="Keywords" content=""> 
    <meta name="Description" content=""> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> 

    <script language="javascript"> 
if (($('#attachment_asset').length) && ($('p.please-wait').length == 0)) { 
    $('.buttons').append($('<p/>', {class: 'please-wait', text: 'Please wait, uploading your file...'})); 
} 
    </script> 
</head> 

<body> 

</body> 
</html> 
0

$('.buttons').append($("<p>").addClass("please-wait").append("Please wait, uploading your file..."));