I want to change top position of class bbb after 100 ms, but it took out that .css(top) does not work.
Please help.
&l
Just like @jhpratt mentioned. You need to add position:relative to the .bbb class.
position:relative
.bbb
See below.
$(function myFunction() { setTimeout(alertFunc, 500); }); function alertFunc() { var b = $('.bbb').first(); b.css('top', 100 + 'px'); }
.bbb { position: relative; border: 1px solid red; }
Bobobo