Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery Sliding Boxes with Captions
    text
    copied!<p>I am using code off this site: <a href="http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/" rel="nofollow">http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/</a></p> <p>My problem is I mouse over and the image slides up and when I mouse off it doesn't slide back down. It should slide down. Does anyone know where my mistake lies here??</p> <p>My Jquery is referenced in a script file:<br /></p> <pre><code>$(document).ready(function () { $('.boxgrid.slidedown').hover( function () { $(".cover", this).stop().animate({ top: '-350px' }, { queue: false, duration: 300 }); }, function () { $(".cover", this).stop().animate({ top: '0px' }, { queue: false, duration: 300 }); }) }); </code></pre> <p>Here's my HTML:</p> <pre><code>&lt;div class="boxgrid slidedown"&gt;&lt;img class="cover" src="http://localhost:60273/www.cooklikecarolyn.com/pics/food-gallery/snowball-cookies.png" alt="" /&gt; &lt;h3&gt;The Nonsense Society&lt;/h3&gt; &lt;p&gt;Art, Music, Word&lt;br /&gt;&lt;a href="http://www.nonsensesociety.com" target="_BLANK"&gt;Website&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; </code></pre> <p>Here's my CSS:</p> <pre><code>.boxgrid{ width: 500px; height: 350px; margin:10px; float:left; background:#161613; border: solid 2px #8399AF; overflow: hidden; position: relative; border: 1px solid blue; cursor: pointer; } .boxgrid img{ position: absolute; top: 0; left: 0; border: 0; } .boxcaption{ float: left; position: absolute; background: #000; height: 100px; width: 100%; opacity: .8; /* For IE 5-7 */ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); /* For IE 8 */ -MS-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; border: 1px solid red; } .captionfull .boxcaption { margin-top: 350px; top: 350; left: 0; } .caption .boxcaption { margin-top: 350px; top: 310; left: 0; } </code></pre>
 

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