Note that there are some explanatory texts on larger screens.

plurals
  1. POHover Effect Caption with Jquery?
    primarykey
    data
    text
    <p>I have a div inside a list item with the display set to none. I want it to fade in when that list item is hovered over. I have been at this for about an hour trying various tutorials but I just can't get it to work...</p> <pre><code>&lt;li data-tags="Websites" class="boxgrid captionfull"&gt; &lt;img src="resources/Portfolio/Thumbs/ChugBeersWebsite.jpg" width="200" /&gt; &lt;div class="boxcaption"&gt; &lt;h3&gt;Chug Beers Site&lt;/h3&gt; &lt;p&gt;&lt;a href="http://www.chugbeers.com"&gt;Visit Site&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;/li&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $(function(){ $('.captionfull').hover(function(){ $(".boxcaption").fadeIn('slow'); }, function() { $(".boxcaption").fadeOut('slow'); }); }) }); &lt;/script&gt; </code></pre> <p>I believe the following script is conflicting it somehow. I am using a filterable portfolio plugin, and I don't know enough jquery to want to mess with it. Any help would be appreciated.</p> <pre><code>$(document).ready(function(){ var items = $('#stage li'), itemsByTags = {}; // Looping though all the li items: items.each(function(i){ var elem = $(this), tags = elem.data('tags').split(','); // Adding a data-id attribute. Required by the Quicksand plugin: elem.attr('data-id',i); $.each(tags,function(key,value){ // Removing extra whitespace: value = $.trim(value); if(!(value in itemsByTags)){ // Create an empty array to hold this item: itemsByTags[value] = []; } // Each item is added to one array per tag: itemsByTags[value].push(elem); }); }); // Creating the "Everything" option in the menu: createList('Everything',items); // Looping though the arrays in itemsByTags: $.each(itemsByTags,function(k,v){ createList(k,v); }); $('#filter a').live('click',function(e){ var link = $(this); link.addClass('active').siblings().removeClass('active'); // Using the Quicksand plugin to animate the li items. // It uses data('list') defined by our createList function: $('#stage').quicksand(link.data('list').find('li')); e.preventDefault(); }); $('#filter a:first').click(); function createList(text,items){ // This is a helper function that takes the // text of a menu button and array of li items // Creating an empty unordered list: var ul = $('&lt;ul&gt;',{'class':'hidden'}); $.each(items,function(){ // Creating a copy of each li item // and adding it to the list: $(this).clone().appendTo(ul); }); ul.appendTo('#container'); // Creating a menu item. The unordered list is added // as a data parameter (available via .data('list'): var a = $('&lt;a&gt;',{ html: text, href:'#', data: {list:ul} }).appendTo('#filter'); } }); #container{ display: block; overflow: hidden; width: 960px; margin: 0; padding: 0px; } #container li{ float: left; height: 229px; list-style: none outside none; margin: 20px; position: relative; width: 200px; -moz-box-shadow: 0 0 5px #000; -webkit-box-shadow: 0 0 5px #000; box-shadow: 0 0 5px #000; border-radius: 7px; overflow:hidden; display:block; } #container li img{ border-radius:7px; position: absolute; } #container ul{ margin: 0px; padding: 0px; } #container ul.hidden{ display:none; } .boxcaption{ text-align: center; float: left; position: absolute; height: 100px; width: 190px; color: #FFF; display: none; bottom: 0; border-bottom-left-radius: 7px; border-bottom-right-radius: 7px; padding-right: 5px; padding-left: 5px; background-image: url(../resources/blackbg.png); background-repeat: repeat; } </code></pre>
    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