rollup(롤업)
<script type="text/javascript">
function rollup(containerID, ulID) {
var $element = $('#' + containerID).find('#' + ulID);
var $play = $('#' + containerID);
var $stop = $('#' + containerID);
var autoPlay = true;
var auto = null;
var speed = 2000;
var timer = null;
var first = false;
var lastChild;
lastChild = $element.children().eq(-1).clone(true);
lastChild.prependTo($element);
$element.children().eq(-1).remove();
if (autoPlay) {
timer = setInterval(moveNextSlide, speed);
auto = true;
}
function moveNextSlide() {
$element.each(function(idx) {
var firstChild = $element.children().filter(':first-child').clone(true);
firstChild.appendTo($element.eq(idx));
$element.children().filter(':first-child').slideUp(300, function() { $(this).remove(); });
});
}
}
$(document).ready(function() {
rollup("rollupWrapper", "rollupItem");
});
</script>