采用以下法典:
// Bind the click event to the thumbnails.
$("ul.hpList").on("click", "a.hpThumb", function (event) {
event.preventDefault();
var $this = $(this),
// Surely there has to be a smarter way to do this.
$hpList = $this.parents("ul.hpList");
changeItem($this, $hpList);
});
我如何更好地确定活动必须具备的根本祖先因素。 我觉得我非常积极地寻找OM。