|
| |
|
|
dexter_wizard19
Posts: 4 Joined: 8/5/2008 Status: offline
|
code to hide content - 8/5/2008 2:23:12
am using wordpress to blog. i need a code like <!---more---> to hide my content. and i need that code to work even if the article is viewed in its own page... the article should come up only wen some one clicks that link. any help ? thanks in advance
|
|
|
|
TexasWebDevelopers
Posts: 202 Joined: 2/22/2002 From: Status: offline
|
RE: code to hide content - 8/5/2008 10:38:21
Not sure if this is exactly what you want but you can show/hide a DIV using javascript and CSS like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>div show hide</title>
<body>
<script type="text/javascript" language="JavaScript">
<!--
function HideContent(e) {
document.getElementById(e).style.display = "none";
}
function ShowContent(e) {
document.getElementById(e).style.display = "block";
}
function FlipContent(e) {
if(document.getElementById(e).style.display == "none") { document.getElementById(e).style.display = "block"; }
else { document.getElementById(e).style.display = "none"; }
}
//-->
</script>
<a onmouseover="ShowContent('div1'); return true;" href="javascript:ShowContent('div1')">[show]</a>
<a onmouseover="HideContent('div1'); return true;" href="javascript:HideContent('div1')">[hide]</a>
<a onmouseover="FlipContent('div1'); return true;" href="javascript:FlipContent('div1')">[show/hide]</a>
<div id="div1" style="display:none;">
Content goes here.
</div>
</body>
</html>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|