Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery hover in Wordpress: fading in a hidden div while fading out the “default” one
    primarykey
    data
    text
    <p>I'm having problems using jQuery's hover feature with the Wordpress loop. Everytime I hover one image (there are 6), they all fade instead of just the single image. Please help. </p> <p>Here's my code:</p> <pre><code>&lt;?php query_posts('showposts=6&amp;cat=-4'); ?&gt; &lt;?php if (have_posts()) : ?&gt; &lt;?php while (have_posts()) : the_post(); if ( $post-&gt;ID == $do_not_duplicate ) continue; update_post_caches($posts); ?&gt; &lt;li class="show1"&gt; &lt;?php $thumb = get_post_meta($post-&gt;ID, 'thumb', true); ?&gt; &lt;a href="#" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;" class="show"&gt;&lt;?php echo$thumb; ?&gt;&lt;/a&gt; &lt;div class="hide"&gt; &lt;h2&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt; &lt;?php the_excerpt(); ?&gt; &lt;a class="view_project" href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;View Project »&lt;/a&gt; &lt;/div&gt; &lt;/li&gt; </code></pre> <p>and my Javascript is</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $('li.show1').children('.hide').hide(); $('li.show1').hover(function() { $(this).children('a.show').fadeOut('slow') .end().children('.hide').fadeIn('slow'); }, function() { $(this).children('a.show').fadeIn('slow') .end().children('.hide').fadeOut('slow'); }); }); &lt;/script&gt; </code></pre> <p>Thanks guys.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload