<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title></title>
<style>
A {color: #CCCCCC}
Li {list-style:none;}
span {padding-right:20px; color: #FFFFFF; font-weight:bold;}
</style>
</head>
<body>
<div id= "Ticker" style= "padding:10px; Background: #333333 ">
<!--START Ticker VER 1.0.1-->
<script src= "Http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type= "Text/javascript" ></script >
<script type= "Text/javascript" >
/* =========================================================
Jquery.innerfade.js
Datum:2008-02-14
Firma:medienfreunde Hofmann & Baldes GbR
Author:torsten Baldes
Mail:t.baldes@medienfreunde.com
Web:http://medienfreunde.com
Based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
and Ralf S. Engelschall http://trainofthoughts.org/
*
* <ul id= "News" >
* <li>content 1</li>
* <li>content 2</li>
* <li>content 3</li>
* </ul>
*
* $ (' #news '). Innerfade ({
* Animationtype:type of animation ' fade ' or ' Slide ' (Default: ' fade '),
* Speed:fading-/sliding-speed in milliseconds or keywords (slow, normal or fast) (Default: ' normal '),
* Timeout:time between the fades in milliseconds (Default: ' 2000 '),
* Type:type of slideshow: ' Sequence ', ' random ' or ' Random_start ' (Default: ' Sequence '),
* Containerheight:height of the containing element in any Css-height-value (Default: ' Auto '),
* Runningclass:css-class which the container get ' s applied (Default: ' Innerfade '),
* Children:optional Children selector (default:null)
* });
*
// ========================================================= */
(function ($) {
$.fn.innerfade = function (options) {
Return This.each (function () {
$.innerfade (this, options);
});
};
$.innerfade = function (container, options) {
var settings = {
' Animationtype ': ' fade ',
' Speed ': ' normal ',
' type ': ' Sequence ',
' Timeout ': 2000,
' Containerheight ': ' Auto ',
' Runningclass ': ' Innerfade ',
' Children ': null
};
if (options)
$.extend (settings, options);
if (Settings.children = = null)
var elements = $ (container). Children ();
Else
var elements = $ (container). Children (Settings.children);
if (Elements.length > 1) {
$ (container). css (' position ', ' relative '). css (' height ', settings.containerheight). addclass (Settings.runningclass) ;
for (var i = 0; i < elements.length; i++) {
$ (elements[i]). CSS (' Z-index ', String (elements.length-i)). css (' position ', ' absolute '). Hide ();
};
if (Settings.type = = "sequence") {
settimeout (function () {
$.innerfade.next (elements, settings, 1, 0);
}, Settings.timeout);
$ (elements[0]). Show ();
else if (Settings.type = = "Random") {
var last = Math.floor (Math.random () * (elements.length));
settimeout (function () {
do {
Current = Math.floor (Math.random () * (elements.length));
while (last = = current);
$.innerfade.next (elements, settings, current, last);
}, Settings.timeout);
$ (Elements[last]). Show ();
else if (Settings.type = = ' Random_start ') {
Settings.type = ' sequence ';
var current = Math.floor (Math.random () * (elements.length));
settimeout (function () {
$.innerfade.next (Elements, settings, (current + 1)% elements.length, current);
}, Settings.timeout);
$ (elements[current]). Show ();
} else {
Alert (' Innerfade-type must either be ' sequence ', ' random ' or ' random_start ');
}
}
};
$.innerfade.next = function (elements, settings, current, last) {
if (Settings.animationtype = = ' Slide ') {
$ (Elements[last]). Slideup (Settings.speed);
$ (elements[current]). Slidedown (Settings.speed);
else if (Settings.animationtype = = ' fade ') {
$ (Elements[last]). fadeout (Settings.speed);
$ (elements[current]). FadeIn (Settings.speed, function () {
Removefilter ($ (this) [0]);
});
} else
Alert (' Innerfade-animationtype must either be ' slide ' or ' fade ');
if (Settings.type = = "sequence") {
if ((current + 1) < Elements.length) {
Current = current + 1;
last = current-1;
} else {
current = 0;
last = elements.length-1;
}
else if (Settings.type = = "Random") {
last = current;
while (current = = last)
Current = Math.floor (Math.random () * elements.length);
} else
Alert (' Innerfade-type must either be ' sequence ', ' random ' or ' random_start ');
settimeout (function () {
$.innerfade.next (elements, settings, current, last);
}), settings.timeout);
};
}) (JQuery);
Remove Opacity-filter in IE * * * *
function removefilter (Element) {
if (Element.style.removeAttribute) {
Element.style.removeAttribute (' filter ');
}
}
</script>
<script type= "Text/javascript" >
Jquery.noconflict ();
Use jquery via jquery (...)
JQuery (document). Ready (function () {
JQuery (' #news '). Innerfade ({
Speed: ' 1 ',
timeout:2000,
CONTAINERHEIGHT:20,
Animationtype: ' fade '
});
});
</script>
<ul id= "News" style= "Overflow:hidden; Display:block; margin:0; Clear:both ">
<li style= "Z-INDEX:5; Position:absolute; Display:none; " ><span>hot news</span><a href= "#" >racing has begun at the 2009 Allegrocup Windsurfing Championship I N. EBA, Poland. This event, organised by ... </a></li>
<li style= "Z-INDEX:4; Position:absolute; Display:none; " ><span>hot news</span><a href= "#" >sean is currently racing on the Euro-challenger FW Event in Pobiero WO, Poland. A small seaside town on the ... </a></li>
<li style= "Z-INDEX:3; Position:absolute; Display:list-item; " ><span>hot news</span><a href= "#" >sean'll be joining the dark side of windsurfing this season, on T He International Point-7 sails .... </a></li>
<li style= "Z-INDEX:2; Position:absolute; Display:none; " ><span>hot news</span><a href= "#" >sean ' all new website for 2009 launched Stay tuned for features on many CSS galleries once. The ... </a></li>
<li style= "Z-INDEX:1; Position:absolute; Display:none; " ><span>hot news</span><a href= "#" >sean has just arrived in Europe and settled into his training-base In the Netherlands, preparing for this ... </a></li>
</ul>
<!--end Ticker-->
</div>
</body>
</html> |