trigger() 方法

trigger()方法触发被选元素的指定事件类型
$(selector).trigger(event,[param1,param2,…])

$("button").click(function(){
  $("input").trigger("select");
});

e.target

target属性规定哪个DOM元素触发了该事件
$(“p, button, h1, h2”).click(function(event){
$(“div”).html(“Triggered by a “ + event.target.nodeName + “ element.”);
});

DOM 元素方法 - index() 方法

index()方法返回指定元素相对于其他指定元素的index位置
$(selector).index()
slides.index(e.target);

$("li").click(function(){
  alert($(this).index());
});

document.documentElement.className = “js”

CSS for when JavaScript is Enabled

By having a default class in the body tag it makes things easier to do “flash on load” fixes like when replacing links with Flash-content f.i., plus I find that it simplifies and prettifies the CSS a whole lot ;

参考文档

trigger()方法
event.target
css-tricks