html
<div id="one" class="bubble"></div>
<div id="two" class="bubble"></div>
<div id="three" class="bubble"></div>
Jquery
$(function () {
function bubble ()
{
$(this).fadeIn(300).delay(2000).fadeOut(400);
}
});
$( document ).ready(function() {
$(.bubble).bubble();
});
I'm not really good with jquery, now what i'm trying to do is to fadein and fadeout the elements with class bubble, what's going wrong?
$(".bubble").each(bubble);might work