<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery
/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
(function($) {
$.fn.marquee = function(o) {
//获取滚动内容内各元素相关信息
o = $.extend({
speed: parseInt($(this).attr('speed')) || 30, // 滚动速度
step: parseInt($(this).attr('step')) || 1, // 滚动步长
direction: $(this).attr('direction') || 'up', // 滚动方向
pause: parseInt($(this).attr('pause')) || 1000 // 停顿时长
}, o || {});
var dIndex = jQuery.inArray(o.direction, ['right', 'down']);
if (dIndex > -1) {
o.direction = ['left', 'up'][dIndex];
o.step = -o.step;
}
var mid;
var div = $(this); // 容器对象
/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
(function($) {
$.fn.marquee = function(o) {
//获取滚动内容内各元素相关信息
o = $.extend({
speed: parseInt($(this).attr('speed')) || 30, // 滚动速度
step: parseInt($(this).attr('step')) || 1, // 滚动步长
direction: $(this).attr('direction') || 'up', // 滚动方向
pause: parseInt($(this).attr('pause')) || 1000 // 停顿时长
}, o || {});
var dIndex = jQuery.inArray(o.direction, ['right', 'down']);
if (dIndex > -1) {
o.direction = ['left', 'up'][dIndex];
o.step = -o.step;
}
var mid;
var div = $(this); // 容器对象