我在用
jGravity
在加载页上。页面在页面加载期间加载不同的div,我想对每个出现的div应用jgravity,但只应用一次。这是我目前掌握的代码,但它每次都对每个div.bubble应用jgravity,所以它会把所有事情都搞砸。
function showDiv() {
if(counter == 0 ) { counter ++; return; }
$('#whatsapp').find('#bubble-' + counter).show().jGravity({
target: 'div.bubble',
ignoreClass: 'ignoreMe',
weight: 25,
depth: 5,
drag: true
});
counter ++;
提前谢谢你