I am implementing a simple 1 page site (for now) which includes javascript drop down content based on this article:
http://www.harrymaugans.com/2007/03/05/how-to-create-a-collapsible-div-with-javascript-and-css/
The javascript code is as follows:
function toggleDiv(divid){
if(document.getElementById(divid).style.display == 'none'){
document.getElementById(divid).style.display = 'block';
}else{
document.getElementById(divid).style.display = 'none';
}
}and the hyperlink link code is:
<a href="[removed];" onmousedown="toggleDiv('mydiv');">Toggle Div Visibility</a>The way I am planning to implement this is that I have the {title} of the document hyperlinked to activate a drop down DIV containing the {body.
Can someone let me know how I can make my DIV tags dynamic for each article and then personalise the css so it applies to all DIV's containing the article body?
The non-live site is here:
http://www.theboxerrebellion.com/index.php/site/indexnew/
Thanks