一昔前の主流
2009年現在はこちらのほうがよろしいらしい。
http://www.slideshare.net/hayatomizuno/jquery-7665168
$(function () { alert('test'); });
setInterval(function(){ alert('test'); },10000);
if ($('#探したい場所のID .その配下のクラス').length > 0) { alert('test'); }
alert(typeof($.cookies.set));
定義されていればobjectとでる。
$('li')
$('li.hoge')
$('li#hoge')
$('DIV#contents LI')
$('DIV#contents > LI')
$('#first, #third")
$("a[href]").each(function(){
}
$("DIV#hoge a[href]").each(function(){
}
$("input[type='checkbox']").removeAttr( 'checked' );
$("input[type='checkbox']").attr( 'checked', 'checked' );
$(".hoge .fuga input[type='checkbox']").removeAttr( 'checked' );$("[href]")
$("[href='hoge']")
$("[href^='hoge']")
$("[href$='hoge']")
$("input").val();
$("input").val("初期値");$("input").("focus",function(){});
$("input").("blur",function(){});
$("input").("change",function(){});
input[type='text'] input[type='password'] input[type='radio'] input[type='checkbox'] input[type='submit'] input[type='image']
:selected :checked
JavaでかかれたJavaScript実装。J2SE6.0から標準添付