我正在努力使我的多引号旋转器正常工作。
我有一个 JS fiddle 并运行Jsfiddle - Multiple Quote Rotator
jQuery(function(){
var quotes1 = [
[ '75', 'Happy Clients' ],
[ '25', 'Emails Typed a day' ],
];
var quotes2 = [
[ '14', 'Coffes a day' ],
[ '1', 'Squeacky Chair' ],
];
var quotes3 = [
[ '70', 'Phone Calls / Day' ],
[ '5', 'Spiders' ],
];
var quotes4 = [
[ '1000', 'Types on the keyboard' ],
[ '100%', 'Qualified Personel' ],
];
var quotes5 = [
[ '55', 'Planes' ],
[ '500', 'Girls' ],
];
var quotes6 = [
[ '160', 'Seo Campaigns running' ],
[ '1', 'Squeacky Chair' ],
];
$('.circle.one').loadText( quotes1, 200);
$('.circle.two').loadText( quotes2, 400 );
$('.circle.three').loadText( quotes3, 600 );
$('.circle.four').loadText( quotes4, 800 );
$('.circle.five').loadText( quotes5, 1000 );
$('.circle.six').loadText( quotes6, 1200 );
});
$.fn.loadText = function( quotes, interval ) {
return this.each( function() {
var obj = $(this);
var quote = random_array( quotes );
var delaytest = delaytest;
var quote_text = '<p class="facts_h1">' + quote[[0],[0]] + '</p>' + '<p class="facts_p">' + quote[[0],[1]] + '</p>';
obj.parent().fadeOut( 'linear', function() {
obj.empty().html(quote_text );
obj.parent().fadeIn(500);
});
$("#quote-reload").click( function(){
if( !obj.is(':animated') ) {
obj.loadText( quotes, interval );
}
});
});
}
function random_array( aArray ) {
var rand = Math.floor( Math.random() * aArray.length + aArray.length );
var randArray = aArray[ rand - aArray.length ];
return randArray;
}
我的问题是我希望我的 6 个引号一个接一个地出现,并带有动画。
我所能管理的只是全局淡入淡出......
我说得有道理吗?