给所有的奇数元素和偶数元素添加内容 获取class为target且索引为奇数的所有元素,并给他们添加class。 $(".target:odd").addClass("animated shake");