$(document).ready(function(){
/* The following code is executed once the DOM is loaded */
$('.box-wrap').bind("click",function(){
$(this).find('.card').addClass('flipped').bind('click',function(){
$(this).removeClass('flipped');
});
});
return false;
});
如果我重新点击了它的工作,但第二次点击另一个div整个脚本不起作用。在控制台或错误中没有迹象。我是jQuery的新手,无法弄清楚这一点。jQuery onclick不隐藏div
$(this).find('.card').addClass('flipped').mouseleave(function(){
这段代码有效,但它不是我要找的。请帮忙
尝试使用' live('click',function(){})'而不是'bind('click',function(){})' – 2013-04-23 05:22:10
你可以显示你的html结构是这个兄弟姐妹吗?让我知道 – 2013-04-23 05:24:37