insert jquery code to table

mollypune

New Member
I'm trying to insert jQuery code that contains images to a \[code\]<td>\[/code\] in a table but the images are out of the table bounds. I tried many ways but it didn't work.Javscript\[code\]<script type="text/javascript"> $(document).ready(function() { var $elements = $('#picOne, #picTwo, #picTree, #picFour'); function anim_loop(index) { $elements.eq(index).fadeIn(4000, function() { var $self = $(this); setTimeout(function() { $self.fadeOut(4000); anim_loop((index + 1) % $elements.length); }, 6000); }); } anim_loop(0); // start with the first element });</script>\[/code\]
HTML\[code\]<table align="center" width="975" border="1"><tr><td><div id="picOne"><img src="http://stackoverflow.com/questions/14552300/pic1.jpg" /></div><div id="picTwo"><img src="http://stackoverflow.com/questions/14552300/pic1b.jpg" /></div><div id="picTree"><img src="http://stackoverflow.com/questions/14552300/2b.jpg" /></div><div id="picFour"><img src="http://stackoverflow.com/questions/14552300/2.jpg" /></div></td></tr></table></body></html>\[/code\]How can i fix it?thanks!
 
Back
Top