$(function(){}) :内部function为DOM加载完成后执行的函数
$("selector").trigger('event') :触发元素的事件
$("<div><p></p></div>").appendTo("selector");
$("myform.elements").hide() :隐藏一个表单中所有元素
$("input ;radio",document.formsp[0]):在文档的第一个表单中查找所有单选按钮(type=radio);
$.holdReady(true);
$.getScript("myplugin.js", function() { $.holdReady(false); });
:恢复/暂停ready()事件
延时就绪事件,知道插件加载完成
$("img").each(function(){console.lgo(this)})
这里的this是DOM对象,要得到jQuery对象,要用$(this);
$.size() 与$.length 返回相同值
$("selector").get([index]) :取得匹配的第index个元素
***
$("selector").data([key],value)
针对dom自定义属性data-[key]的操作
//可实现在元素上存取数据的目的
$("div").data("blah"); // undefined
$("div").data("blah", "hello"); // blah设置为hello
$("div").data("blah"); // hello
$("div").data("blah", 86); // 设置为86
$("div").data("blah"); // 86
$("div").removeData("blah"); //移除blah
$("div").data("blah"); // undefined