ready

var rollingDiv = $("#rolling"); rollingDiv.rolling("left", 110, 70, 4); rollingDiv.addRollingItem("<a href='/new/sub02/sub01.html' target='_self'><img src='/new/img/mproduct01.jpg' alt='1 item' border='0'/></a>"); rollingDiv.addRollingItem("<a href='/new/sub02/sub01.html' target='_self'><img src='/new/img/mproduct02.jpg' alt='2 item' border='0'/></a>"); rollingDiv.addRollingItem("<a href='/new/sub02/sub01.html' target='_self'><img src='/new/img/mproduct03.jpg' alt='3 item' border='0'/></a>"); rollingDiv.addRollingItem("<a href='/new/sub02/sub01.html' target='_self'><img src='/new/img/mproduct04.jpg' alt='4 item' border='0'/></a>"); rollingDiv.bindRollingEvent(function(event, currentRollingItem) { $("#rollingComment").html("top=" + currentRollingItem.parent().css("top") + ", left=" + currentRollingItem.parent().css("left")); }); rollingDiv.bindViewingEvent(function(event, currentRollingItem) { $("#viewingComment").html($("img", currentRollingItem).attr("alt")); }); rollingDiv.bindStartEvent(function(event) { $("#rollingStatus").html("Start"); }); rollingDiv.bindStopEvent(function(event) { $("#rollingStatus").html("Stop"); }); rollingDiv.startRolling(100, 2000, 4); $("input[type='text'][name='rollingTime']").val(rollingDiv.getRollingTime()); $("input[type='text'][name='viewingTime']").val(rollingDiv.getViewingTime()); $("input[type='text'][name='rollingAnimationFrame']").val(rollingDiv.getRollingAnimationFrame()); $("#viewingItemCount").text(rollingDiv.getViewingItemCount()); $("#rollingItemCount").text(rollingDiv.getRollingItems().size()); $("#direction").text(rollingDiv.getRollingDirection());