$(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