I've been working on this html code that allows an image to blink as well as auto resize to the browser size. I have the code working that will allow it to blink:
<html>
<head>
<script type="text/javascript">
function blink() {
var e = document.getElementById("blinker");
e.style.visibility = ( e.style.visibility == 'visible' )? 'hidden' : 'visible';
setTimeout("blink();", 1000);
}
</script>
<body onload="blink();">
<table id="table">
<tr><td>
<img id="blinker" src="plesk_logo_fist_2.png">
</td></tr>
</table>
</body>
<style type="text/css">
html, body {
max-width:100%;
max-height:auto;
}
#table {
max-width:100%;
max-height:auto;
text-align: center;
vertical-align: middle;
}
#table img {
max-width:100%;
max-height:auto;
}
</style>
And the code that will resize:
<html>
<head>
<style>
* {
padding: 0;
margin: 0;
}
.fit { /* set relative picture size */
max-width: 100%;
max-height: 100%;
}
.center {
display: block;
margin: auto;
}
</style>
</head>
<body>
<img class="center fit" src="plesk_logo_fist_2.png">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="JavaScript">
function set_body_height() { // set body height = window height
$('body').height($(window).height());
}
$(document).ready(function() {
$(window).bind('resize', set_body_height);
set_body_height();
setTimeoutInterval(2000,function(){$
(".element").css({backgroundColor:"none"});});
});
</script>
But, I can't seem to get them working together. Any help to get these to work together (or using alternative method) would greatly appreciated.