.mouseover on various divs
I'm learning jquery and code below makes hovering a div in another div to appear, and when the mouse leave the div disappears. But as you can see, the div "visualizar" this in a loop and when I move the mouse in a div appears in all, I wonder how I can make a div to appear at a time, I could modify the code?
script jquery:
- <script type="text/javascript">
- window.onload = inicia;
- function inicia() {
- $("#visualizar").mouseover(
- function() {
- $("div.editarVis").show("slow");
- }
- )
- $("#visualizar").mouseout(
- function() {
- $("div.editarVis").hide("slow");
- }
- )
- };
- </script>
html and php:
- <?php
- require_once("includes/classes/bdClass.php");
-
- $instEstudo = new bdClass;
-
- $returnEstudo = $instEstudo->selectQuery("SELECT * FROM tab_estudos ORDER BY data_estudo");
-
- foreach($returnEstudo as $allEstudo) {
- ?>
-
- <div id="visualizar">
-
- <?php echo $allEstudo['titulo_estudo']; ?>
-
- <div class="editarVis" style="display:none;">
- Tiago
- </div>
-
- </div>
-
- <?php
- }
- ?>
Can anyone help me?
Thanks