Hi,
<html>
<head>
<title>"Mehr"-Anzeige</title>
<style type="text/css"><!--
[code lang=css]
a.more:link { color:#CC0000; font-style:normal; font-weight:bold; }
a.more:visited { color:#CC0000; font-style:normal; font-weight:bold; }
a.more:active { color:#0000CC; font-style:normal; font-weight:bold; }
a.more:hover { color:#FF0000; font-style:normal; font-weight:bold; }
~~~--></style>
<script type="text/javascript" language="JavaScript"><!--
~~~javascript
function hideMore(moreTag,moreName,moreText) {
if(document.getElementsByTagName) {
coll=document.getElementsByTagName(moreTag);
for(i=0; i<coll.length; i++) {
if(coll[i].className==moreName) {
coll[i].innerHTML="... [<a class=\"more\" href=\"#"+moreText.replace(/\W/g,'_')+"\" onClick=\"this.parentNode.innerHTML=unescape('"+escape(coll[i].innerHTML)+"'); return false;\">"+moreText+"<\/a>]";
}
}
}
}
~~~//--></script>
</head>
<body>
<h3>News 1</h3>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span class="more">Suspendisse convallis purus nec erat. Nam dapibus nonummy ipsum. Etiam lobortis velit. In et tellus. Nunc sit amet dui. Maecenas purus. Fusce lacinia. Cras sit amet ipsum. Duis molestie. Nulla ac tellus. Vestibulum viverra. Maecenas a libero at justo molestie dictum. Vestibulum vel wisi. Vivamus metus odio, tincidunt ut, gravida et, euismod feugiat, velit. Nulla facilisi.</span>
</p>
<h3>News 2</h3>
<p>
Lorem ipsum dolor sit amet, <span class="more">consectetuer adipiscing elit. Suspendisse convallis purus nec erat. Nam dapibus nonummy ipsum. Etiam lobortis velit. In et tellus. Nunc sit amet dui. Maecenas purus. Fusce lacinia. Cras sit amet ipsum. Duis molestie. Nulla ac tellus. Vestibulum viverra. Maecenas a libero at justo molestie dictum. Vestibulum vel wisi. Vivamus metus odio, tincidunt ut, gravida et, euismod feugiat, velit. Nulla facilisi.</span>
</p>
<script type="text/javascript" language="JavaScript"><!--
~~~javascript
// Alle SPANs der Klasse "more" durch einen Link mit dem Text "mehr" ersetzen
hideMore("span","more","mehr");
~~~//--></script>
</body>
</html>[/code]
Gruß, Cybaer
--
Hinweis an Fragesteller: Fremde haben ihre Freizeit geopfert, um Dir zu helfen. Helfe Du auch im Archiv Suchenden: Beende deinen Thread mit einem "Hat geholfen" oder "Hat nicht geholfen"!