Problem with animate({width:'toggle'}); on mouseover/mouseleave...
Hello everyone,
I'm actually working on my future new website (I'm graphic designer), which is almost ready. However, there is some kind of bug I can't solve : I want to, at articles mouseover, that a div, with some related informations, slides horizontally.
As you can see on my testing website, on article's over, the div slides normally, but if you go to the right-bottom corner (the "+" square), the animation "blows". And worse, if you go on the "just slided" div...
I checked my codes (html, css, js), but can't see where is the problem. I'm beginning in jQuery, so... If someone could help, it would fantastic !
Here is my js :
- $(document).ready(function(){
- // Affichage infos articles
- $('section#content article hgroup').hide();
- $('article a').mouseover(function(){
- $(this).find('hgroup').animate({width:'toggle'});
- });
- $('article a').mouseleave(function(){
- $(this).find('hgroup').animate({width:'toggle'});
- });
- });
And my html :
- <article id="post-206">
- <a href="http://www.soykje.com/testeur/logo-edd" title="Cliquez pour voir plus de détails">
- <header class="entry-header">
- <p class="more">+</p>
- <hgroup>
- <h1 class="entry-title">Réseau EDD</h1>
- <h2>Conception & réalisation d'un logo associatif</h2>
- </hgroup>
- </header>
- <div class="entry-content">
- <img src="http://www.soykje.com/testeur/wp-content/uploads/2102/11/EDD-11.jpg" alt=""/>
- </div>
- </a>
- </article>
Thanks a lot !