0
我試圖用一個數組中的其餘圖像切換出圖像列表。我有一個15張圖像的陣列,我顯示了其中的6個圖像,並且我需要逐個切換剩餘圖像的圖像。淡入淡出數組的圖像
var images = [
'<img class="wp-image-2443" src="http://2-story.com/wp-content/uploads/2012/07/ab-data.png" alt="ab Data" />',
'<img class="wp-image-2444" src="http://2-story.com/wp-content/uploads/2012/07/american-transmission-company.png" alt="American Transmission Company" />',
'<img class="wp-image-2445" src="http://2-story.com/wp-content/uploads/2012/07/arts-at-large.png" alt="Arts @ Large" />',
'<img class="wp-image-2446" src="http://2-story.com/wp-content/uploads/2012/07/baseball-tomorrow.png" alt="Baseball Tomorrow" />',
'<img class="wp-image-2447" src="http://2-story.com/wp-content/uploads/2012/07/brewers-community-foundation.png" alt="Brewers Community Foundation" />',
'<img class="wp-image-2448" src="http://2-story.com/wp-content/uploads/2012/07/city-of-milwaukee.png" alt="City of Milwaukee" />',
'<img class="wp-image-2449" src="http://2-story.com/wp-content/uploads/2012/07/columbia-stmarys-foundation.png" alt="Columbia St. Mary Foundation" />',
'<img class="wp-image-2450" src="http://2-story.com/wp-content/uploads/2012/07/digestive-health-insurance.png" alt="Digestive Health Alliance" />',
'<img class="wp-image-2451" src="http://2-story.com/wp-content/uploads/2012/07/dorner.png" alt="Dorner" />',
'<img class="wp-image-2486" src="http://2-story.com/wp-content/uploads/2012/07/echelon-innovation-campus.png" alt="Echelon Innovation Campus" />',
'<img class="wp-image-2452" src="http://2-story.com/wp-content/uploads/2012/07/great-lakes-distillery.png" alt="Great Lakes Distillery" />',
'<img class="wp-image-2453" src="http://2-story.com/wp-content/uploads/2012/07/habitati-for-humanity.png" alt="Habitat for Humanity" />',
];
$(document).ready(function(){
$.each(images, function(index, image) {
if (index > 5) {
return false;
}
$('.logo-container').append(image);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="logo-container">
</div>
_「我有15幅圖像的數組,我展示他們的6,我需要轉出的圖像一一」 _不能肯定你是什麼意思?最初的六個仍然顯示,第七個是通過剩餘的九個圖像循環? – guest271314