Le clic sur une div ne fonctionne pas
Bonjour,
j'essaye de mettre un clique sur une div pour pouvoir charger une page avec load mais ça ne fonctionne pas et je ne comprend pas pourquoi.
Voici le code :
javascript
Code:
1 2 3 4 5 6 7
| $(document).ready(function(){
alert("ready");
$("#DNAbox").click(function() {
$(#main).load("/toto.html");
return false;
});
}) |
html
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link style="text/css" rel="stylesheet" href="Style/css/bioinfo.css" />
<link style="text/css" rel="stylesheet" href="Style/css/box_homepage.css" />
<script type="text/javascript" src="/libs/jquery-1.11.0.js"></script>
<script type="text/javascript" src="/scripts/bioinfo.js"></script>
<title>bioinfo.lifl.fr - Bonsai Bioinformatics</title>
</head>
<body>
<div id="main">
<div id="container_box">
<div id="DNAbox" class="boxHome">
<div class="iconeBox">
<img src="/Style/icon/DNA.png" alt="dna"/>
</div>
<div class="textBox">
<h3> DNA </h3>
<p> genome comparison, homology search, gene prediction, genome structure</p>
</div>
</div>
</div>
</div>
</body>
</html> |
J'ai mis le plus gros du code!
J'espère que quelqu'un va pouvoir m'aider rapidement
Alaninho