我似乎无法获得jQuery的.hide()函数.
码
<img class="jh-search" src="http://www.placehold.it/100x100" />
Run Code Online (Sandbox Code Playgroud)
$(document).ready(function(){
$('.jh-search').click(function(){
(this).hide();
});
});
Run Code Online (Sandbox Code Playgroud)
这是一个小提琴
$(this) 是当前上下文的jQuery对象
$(document).ready(function(){
$('.jh-search').click(function(){
$(this).hide(); //$ to wrap as jQuery object.
});
});
Run Code Online (Sandbox Code Playgroud)