我一般在jQuery的
$(document).ready(function() {
//stuff
}
我只是對大量使用jQuery的一個網站上使用這一點,他們把它用
$j(document).ready(function() {
//stuff
}
在這個網站上,他們開始幾乎所有出與第j .. 。
function PostComment(form) {
form = $j(form);
$j('#CommentSubmitButton').hide();
$j('#CommentInProgress').show();
$j.post('/utils/ajaxhandler.aspx', form.serialize(), function(data) {
$j('#CommentInProgress').hide();
$j('#CommentSubmitButton').show();
});
}
這只是另一種方式,或者這是依賴於不同版本的jquery或其他?
有用的知識,你可以「做它」,或者你需要定義它/設置它在別的地方嗎? – JasonDavis 2009-09-07 23:29:18
http://docs.jquery.com/Using_jQuery_with_Other_Libraries#Overriding_the_.24-function – janoliver 2009-09-07 23:30:55
'$ j = jQuery.noConflict();' – gnarf 2009-09-08 01:29:39