I am trying to implement a hover javascript so once the mouse hovers over the image the project title appears
Currently it seems to display the project title rather than the image beneath it
Am I missing something vital?
<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/modernizr-2.5.3.min.js"></script>
<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/plugins.js"></script>
<script type="text/javascript" src="/jj/wp-content/themes/child/scripts/script.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
</head>
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<!-- portfolio-catcher -->
<div id="portfolio-catcher">
</div>
<!-- .portfolio-catcher -->
<header>
<!-- container -->
<div class="container">
<nav id="local">
<a rel="nofollow" href="#portfolio">Portfolio</a> |
<a rel="nofollow" href="#contact">Contact</a>
</nav>
<h1><a href="#portfolio"><img src="/assets/img/hattie-newman.png" alt="Hattie Newman" /></a></h1>
<nav id="external">
<a href="//hattienewman.tumblr.com" target="_blank">News</a> |
<a href="//twitter.com/hattienewman" target="_blank">Twitter</a>
</nav>
<div class="clearfix"></div>
</div>
<!-- .container -->
</header>
The
heightof the<span>within the<p>tag present just before the<hgroup>tag within each<li>group is being set to the same height as the<hgroup>element. Setting the height of this<span>to zero displays the<img>below. The hover seems to be working fine. If you want the colored swatch to completely cover the image then you can remove the<p>altogether.From Firebug: