tooth-paste Posted February 25, 2016 Share Posted February 25, 2016 I'am using this script to generate portfolio rows with Foundation. Now I would like to crossfade another image on hover. Is it possible to integrate the two IMG tags? <div class="row rowpadding"> <?php $items = $pages->get("/projecten/")->children; $i = 1; foreach ($items as $item) { echo "<div class='medium-6 small-12 columns'> <div class='image text-center'> <a href='{$item->url}'><img src='{$item->overzichtsthumb->first()->url}' alt='' /> <p>$item->title</p></a> </div>"; if($i % 2 == 0) { echo "</div></div> <div class='row rowpadding'>";} else { echo "</div>";} $i++;} ?> </div> And both the image tags. The CSS is controlling the opacity. <div id="cf"> <img class="bottom" src="/images/first.jpg" /> <img class="top" src="/images/second.jpg" /> </div> Link to comment Share on other sites More sharing options...
tooth-paste Posted February 25, 2016 Author Share Posted February 25, 2016 Solved it myself. I added a new image field. thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now