I'm having problem with the creation of a hover box with jquery:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Examples</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="../../../script/jquery-1.7.1.min.js"></script>
<style>
div#infobox {
display: none;
background-color: blue;
}
</style>
<script>
$(document).ready(function() {
var span = $('span#hover');
span.hover(
function() {
$(this).children('#infobox').show();
},
function() {
$(this).children('#infobox').hide();
});//end hover
});//end ready
</script>
</head>
<body>
<p> This is a sentence. <span id="hover">[info] <div id="infobox"> info goes here </div></span> </p>
<p> This is another sentence. <span id="hover">[info] <div id="infobox"> info goes here </div></span> </p>
</body>
</html>