<title>
Javascript demo - expand/collapse text
</title>
<script language="JavaScript" type="text/javascript">
function blocking(nr)
// for displaying or hiding parts of the page
{
displayNew = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
document.getElementById(nr).style.display = displayNew;
}
</script>
</head>
<!-- initially hide the contents of whatItIs and background -->
<body onload="blocking('whatItIs'); blocking('background');">
<a href="" onclick="changetext(); blocking('whatItIs'); return false;" id="see">See more...</a>
<br><br>
<div id="whatItIs">
Pardus is a GNU/Linux distribution developed in Turkey, as a product of the Pardus Project. It was named after the Anatolian Leopard.
<br><br>
Pardus is an easy-to-install and -use operating system, with many enhancements to desktop usability, compatibility and security. With Pardus 1.0 (and the now-released Pardus 2007 version), users can connect to Internet, read e-mails, securely communicate with others and exploit the computer's multimedia capabilities by listening to music and watching movies.
<br><br>
Ladislav Bodnar, the creator of DistroWatch, wrote in his round-up of Linux/*nix in 2006 that Pardus is one of the distros he was most impressed by this year "...thanks to unique package management ideas, innovative start-up sequence and general desktop polish..."
<br><br>
Pardus is open source and freely distributed as a GPL (General Public License) product. It can be installed in Turkish, English, Spanish, German or Dutch.
<br><br>
</div>
</body>
JavaScript
changetext = function (){
if($("#see").text() == "See more..."){
$("#see").text("hide");}
else{$("#see").text("See more...");}
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.