/ Published in: jQuery
Expand |
Embed | Plain Text
function move2left(box) { /* Prepare */ orgi = box.children('.movingContent'); orgiw = orgi.width(); clonetime = Math.ceil(box.width() / orgi.width()); children = orgi.children(); /* Clone War */ for ( var i = 0; i < clonetime; i++ ) { children.clone().appendTo(box.children('.movingContent')); } /* Move Now ! */ (function movenow(ele) {ele.css("left",0) .animate({"left": (0 - orgiw) + "px"}, 15000, "linear", function () { movenow(ele); }); })(orgi); } $(document).ready(function() { move2left( $("#newstickerbox") ); });
You need to login to post a comment.
