jQuery this

http://stackoverflow.com/questions/306583/this-selector-and-children

http://stackoverflow.com/questions/1051782/jquery-this-vs-this

 

jquery构造函数接受第二个参数来重写选择的上下文

如:jQuery('img',this);

等同于jQuery(this).find("img");

如果图片是点击的元素的后代(子级),则可以这样使用

jQuery(this).children("img"); 

posted @ 2012-10-28 16:48  程序员阿呆  阅读(257)  评论(0)    收藏  举报