nooneatall
New member
Danke! Werd mich morgen mal dransetzen...
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<?php include('loader.php'); ?>
<?php
// loader.php
$dom = new DomDocument();
$dom->loadHTMLFile('vertretungsplan.html');
echo $dom->getElementsByTagName('body')->item(0)->nodeValue;
?>
$(document).ready(function(){
$('#iframe').load(function() {
$(this).height(this.contentWindow.document.body.scrollHeight);
var scrollamount = $(document).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
jQuery.fn.doScroll = function() {
$(this).delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', $(this).doScroll);
};
$(this).height($(window).height()).doScroll();
});
});
<body>
<iframe name="content" src="deine_html_datei.html" style="position:absolute" width="1500px" height="200px" frameborder="0" scrolling="no" id="iframe" >
</body>
Meinst du generell? Warum denn nicht? Oder sind die deprecated?seit wann empfehlten wir denn hier wiedre iframes.
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#iframe').load(function() {
$(this).height(this.contentWindow.document.body.scrollHeight);
var scrollamount = $(document).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
jQuery.fn.doScroll = function() {
$(this).delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', $(this).doScroll);
};
$(this).height($(window).height()).doScroll();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#iframe2').load(function() {
$(this).height(this.contentWindow.document.body.scrollHeight);
var scrollamount = $(document).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
jQuery.fn.doScroll = function() {
$(this).delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', $(this).doScroll);
};
$(this).height($(window).height()).doScroll();
});
});
</script>
jQuery.fn.scroller = function() {
var scrollamount = $(this).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
doScroll = function () {
$(this).delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', $(this).doScroll);
};
$(this).height($(window).height()).doScroll();
};
$(document).ready(function(){
$('#globdiv').scroller();
$('#globdiv2').scroller();
});
$.fn.doScroll = function(pauseduration, scrollamount, scrollduration, docheight) {
$(this).delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', function(){
$(this).doScroll(pauseduration, scrollamount, scrollduration, docheight);
});
};
$.fn.scroller = function(){
var scrollamount = $(this).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
$(this).height($(window).height()).doScroll(pauseduration, scrollamount, scrollduration, docheight);
};
$(document).ready(function(){
$('#globdiv').scroller();
$('#globdiv2').scroller();
});
jQuery.fn.scroller = function() {
var scrollamount = $(this).height() - $(window).height();
var scrollduration = scrollamount * 10;
var pauseduration = 3000;
var docheight = $(this).height();
function doScroll(obj) {
obj.delay(pauseduration)
.animate({top: -scrollamount, height: docheight}, scrollduration, 'linear')
.delay(pauseduration)
.animate({top: 0, height: $(window).height()}, scrollduration, 'linear', function() {
doScroll(obj);
});
};
$(this).height($(window).height());
doScroll($(this));
};
$(document).ready(function(){
$('#globdiv').scroller();
$('#globdiv2').scroller();
});
if (docheight > $(window).height()) doScroll($(this));
jQuery.fn.scroller = function() {
var scrollamount = $(this).height() - $(window).height();
var pauseduration = 3000;
var pausescroll = 5000;
var stepsize = 400;
var factorduration = 10;
var docheight = $(this).height();
var position = 0;
function scrollDown (obj) {
if (position == 0) currentdelay = pauseduration; else currentdelay = pausescroll;
if (position + stepsize < scrollamount) {
position += stepsize;
duration = stepsize * factorduration;
obj.delay(currentdelay).animate({top: - position}, duration, function (){
scrollDown(obj);
})
} else {
duration = (scrollamount - position) * factorduration;
position = scrollamount;
obj.delay(currentdelay).animate({top: -position}, duration, function (){
scrollUp(obj);
});
}
};
function scrollUp (obj) {
if (position == scrollamount) currentdelay = pauseduration; else currentdelay = pausescroll;
if (position - stepsize > 0) {
position -= stepsize;
duration = stepsize * factorduration;
obj.delay(currentdelay).animate({top: - position}, duration, function (){
scrollUp(obj);
})
} else {
duration = position * factorduration;
position = 0;
obj.delay(currentdelay).animate({top: -position}, duration, function () {
scrollDown(obj);
});
}
};
if (docheight > $(window).height()) scrollDown($(this));
// $(this).height($(window).height());
};
$(document).ready(function(){
$('#globdiv').scroller();
$('#globdiv2').scroller();
});
jQuery.fn.scroller = function() {
var scrollamount = $(this).height() - $(window).height();
var pauseduration = 3000;
var pausescroll = 5000;
var stepsize = 400;
var factorduration = 5;
var docheight = $(this).height();
var position = 0;
function scrollDown (obj) {
if (position == 0) currentdelay = pauseduration; else currentdelay = pausescroll;
if (position + stepsize < scrollamount) {
position += stepsize;
duration = stepsize * factorduration;
obj.delay(currentdelay).animate({top: - position, height: position + $(window).height()},
duration, function (){scrollDown(obj);});
} else {
duration = (scrollamount - position) * factorduration;
position = scrollamount;
obj.delay(currentdelay).animate({top: -position, height: position + $(window).height()},
duration, function (){scrollUp(obj);});
}
};
function scrollUp (obj) {
if (position == scrollamount) currentdelay = pauseduration; else currentdelay = pausescroll;
if (position - stepsize > 0) {
position -= stepsize;
duration = stepsize * factorduration;
obj.delay(currentdelay).animate({top: - position, height: position + $(window).height()},
duration, function (){scrollUp(obj);});
} else {
duration = position * factorduration;
position = 0;
obj.delay(currentdelay).animate({top: -position, height: position + $(window).height()},
duration, function () {scrollDown(obj);});
}
};
if (docheight > $(window).height()) {
$(this).height($(window).height());
scrollDown($(this));
};
};
$(document).ready(function(){
$('#globdiv').scroller();
$('#globdiv2').scroller();
});
Das stimmt so nicht. Interfaces sind nicht nur für mehrfachvererbung da. In anderen Sprachen kann man die deutlich besser nutzen.Man könnte sogar auch Interfaces machen, aber das ist eigentlich sinnfrei, da diese ja nur Hilfskrücken für fehlende multiple Vererbung sind und man in JS wunderbar MixIns machen kann.