Rolling With Some Effect Example


Added Item Count 4, Viewing Item Count 2  
$(function() { var rollingDiv = $("#rolling1"); rollingDiv.rolling("down", 140, 110, 2); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/ayjjsallNwc/default.jpg' width='130' height='100' alt='first item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/pe-MIDDfckw/default.jpg' width='130' height='100' alt='second item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/AyRIvX25vRQ/default.jpg' width='130' height='100' alt='third item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/GxplDa3M5Io/default.jpg' width='130' height='100' alt='fourth item' border='0'/>"); rollingDiv.bind("mouseover", function() { $("#rolling1").stopRolling(); }); rollingDiv.bind("mouseout", function() { $("#rolling1").resumeRolling(); }); var opacity = 0.6; $('img', rollingDiv.getRollingItems()).css("opacity", opacity); $('img', rollingDiv.getRollingItems()).hover( function() { $(this).animate({ width: "140", height: "110", opacity: 1 }, 500); }, function() { $(this).animate({ width: "130", height: "100", opacity: opacity }, 500); } ); rollingDiv.startRolling(50, 0, 50); });

Added Item Count 4, Viewing Item Count 3  
$(function() { var rollingDiv = $("#rolling2"); rollingDiv.rolling("left", 140, 110, 3); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/ayjjsallNwc/default.jpg' width='130' height='100' alt='first item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/pe-MIDDfckw/default.jpg' width='130' height='100' alt='second item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/AyRIvX25vRQ/default.jpg' width='130' height='100' alt='third item' border='0'/>"); rollingDiv.addRollingItem("<img src='http://i.ytimg.com/vi/GxplDa3M5Io/default.jpg' width='130' height='100' alt='fourth item' border='0'/>"); rollingDiv.bind("mouseover", function() { $("#rolling2").stopRolling(); }); rollingDiv.bind("mouseout", function() { $("#rolling2").resumeRolling(); }); var opacity = 0.6; $('img', rollingDiv.getRollingItems()).css("opacity", opacity); $('img', rollingDiv.getRollingItems()).hover( function() { $(this).animate({ width: "140", height: "110", opacity: 1 }, 300); }, function() { $(this).animate({ width: "130", height: "100", opacity: opacity }, 300); } ); rollingDiv.startRolling(50, 0, 50); });

Added Item Count 4, Viewing Item Count 3  
$(function() { var rollingDiv = $("#rolling3"); rollingDiv.rolling("right", 140, 110, 3); rollingDiv.addRollingItem("<div style='background-color:red;width:130;height:100'><table width='100%' height='100%'><tr><td align='center' valign='center'><font color='white'>A</font></td></tr></table></div>"); rollingDiv.addRollingItem("<div style='background-color:blue;width:130;height:100'><table width='100%' height='100%'><tr><td align='center' valign='center'><font color='white'>B</font></td></tr></table></div>"); rollingDiv.addRollingItem("<div style='background-color:green;width:130;height:100'><table width='100%' height='100%'><tr><td align='center' valign='center'><font color='white'>C</font></td></tr></table></div>"); rollingDiv.addRollingItem("<div style='background-color:gray;width:130;height:100'><table width='100%' height='100%'><tr><td align='center' valign='center'><font color='white'>D</font></td></tr></table></div>"); rollingDiv.bind("mouseover", function() { $("#rolling3").stopRolling(); }); rollingDiv.bind("mouseout", function() { $("#rolling3").resumeRolling(); }); var opacity = 0.6; $('div', rollingDiv.getRollingItems()).css("opacity", opacity); $('div', rollingDiv.getRollingItems()).hover( function() { $(this).animate({ width: "140", height: "110", opacity: 1 }, 300); }, function() { $(this).animate({ width: "130", height: "100", opacity: opacity }, 300); } ); rollingDiv.startRolling(50, 1000, 50); });