We would like to know how to hover to toggle text in div.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.wrap {<!--from w ww . j a v a2s . com-->
outline: 1px dotted blue;
height: 300px;
}
.noshow, .wrap:hover .show {
display: none
}
.wrap:hover .noshow {
display: block
}
</style>
</head>
<body>
<div class="wrap">
<div class="show">
<p>if { </p>
<p>yourSite < awesome; </p>
<p>solution = aislingDouglas (HTML5 + CSS3 + </p>
<p>JavaScript + PHP); </p>
<p>} </p>
<p>else { </p>
<p>solution = null; </p>
<p>} </p>
</div>
<div class="noshow">
<p>Need a website? </p>
<p>You found your dream developer! </p>
<p>And hey - I already helped you on the web, </p>
<p>why not let me help you </p>
<p>build an amazing site! </p>
</div>
</div>
</body>
</html>
The code above is rendered as follows: