Forum Moderators: open
Article header:
Small amount of content #*$!#*$! #*$!#*$! #*$!#*$! #*$!#*$!xx
More:
(Then when the more is clicked on it drops content and at the end of that content there is a line that says toggle article).
Help Guys
Otherwise, you will need to access the content you want to toggle (e.g. using getElementById) and change the element's CSS to show and hide the content.
<html>
<head>
<title> My Page </title>
<script type="text/javascript">
function cacherVoir(theDIV){
leStyle = document.getElementById(theDIV).style ;
if(leStyle.display == "block") {
leStyle.display = "none";
}
else{
leStyle.display = "block";
}
}
</script>
</head>
<body>Lorem ipsum dolor sit amet (<a href="#" onclick="cacherVoir('myDiv'); return false;">show/hide</a>)
<div id="myDiv" style="display:none;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean eu sem sed turpis fringilla ornare. Duis risus sapien, ullamcorper non, pharetra eget, feugiat sit amet, dui. Vivamus dignissim. Phasellus aliquet eros ac velit laoreet elementum. Praesent vehicula lacus eget risus. Nunc auctor. Sed sit amet libero vel dui vestibulum venenatis. Nullam eget lorem. Aenean fermentum erat sit amet magna. Nam vehicula massa. Aenean eget mauris. Duis a pede. Suspendisse potenti. Curabitur condimentum eros eu nunc.</div>
</body>
</html>
People with JavaScript enabled browsers will get to read the DIV and others would be directed to another page containing the article.
Just another option.
If the actual content for the 'more' links was located elsewhere, then maybe ajax would be a better bet?