da verstehe ich zuwenig von der Sprache, was da wirklich geändert werden und passieren muss.
So kommt jedenfalls nur Murks raus:
Code:
<!--
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// **********************************************************************
-->
// https://www.onvista.de/index/DAX-Index-20735
// https://www.onvista.de/index/MDAX-Index-323547
// https://www.onvista.de/index/Dow-Jones-Index-324977
// https://www.onvista.de/aktien/Alibab...e-US01609W1027
// https://www.onvista.de/aktien/Facebo...e-US30303M1027
<html lang="en">
<head>
<script type="text/javascript" src="https://www.onvista.de/index/DAX-Index-20735"></script>
<script type="text/javascript">
$(document).ready(function () { //start after HTML, images have loaded
var InfiniteRotator =
{
init: function()
{
//initial fade-in time (in milliseconds)
var initialFadeIn = 1000;
//interval between items (in milliseconds)
var itemInterval = 5000;
//cross-fade time (in milliseconds)
var fadeTime = 2500;
//count number of items
var numberOfItems = $('.rotating-item').length;
//set current item
var currentItem = 0;
//show first item
$('.rotating-item').eq(currentItem).fadeIn(initialFadeIn);
alert("PREPARED");
//loop through the items
var infiniteLoop = setInterval(function(){
$('.rotating-item').eq(currentItem).fadeOut(fadeTime);
alert("ROTATING");
if(currentItem == numberOfItems -1){
currentItem = 0;
}else{
currentItem++;
}
$('.rotating-item').eq(currentItem).fadeIn(fadeTime);
}, itemInterval);
alert("DONE");
}
};
InfiniteRotator.init();
});
</script> <meta charset="utf-8" />
<title>Infinite Rotating Images Using jQuery (JavaScript) - Unstyled</title>
</head>
<body>
<h1>Infinite Rotating Images Using jQuery (JavaScript) - Unstyled</h1>
<div id="rotating-item-wrapper">
<div class="rotating-item"><object type="text/html" data="https://www.onvista.de/index/MDAX-Index-323547" /></div>
<div class="rotating-item"><object type="text/html" data="www.onvista.de/index/Dow-Jones-Index-324977" /></div>
<div class="rotating-item"><object type="text/html" data="https://www.onvista.de/aktien/Alibab...e-US01609W1027" /></div>
<div class="rotating-item"><object type="text/html" data="www.onvista.de/aktien/Facebo...e-US30303M1027" /></div>
</div>
</body>
Lesezeichen