When an image is clicked the project text seems to appear but the header is duplicated and the ‘Back to Portofolio’ button and header buttons don’t appear to work.
If you return to the ‘Portfolio’ page the project text is still appearing.
http://www.janinejauvel.com/test/
html
<li style="height:393px;" data-src="http://www.janinejauvel.com/wp-content/uploads/2012/09/editorial-1-rwd-magazine.png">
<span class="cover" style="width:308px;height:0px;background-image:url('http://www.janinejauvel.com/wp-content/uploads/2012/09/bg-white.png')"></span>
<hgroup style="width:308px;height:393px;background-image:url('http://www.janinejauvel.com/wp-content/uploads/2012/09/bg-white.png')" data-project="test/dirty-fashion">
<div>
<h3>Editorial I</h3>
<span class="dash">—</span>
<p>RWD Magazine</p>
</div>
</hgroup>
</li>
script.js
// load the project into the slideshow container div
$('#slideshow-container').load('' + $hgroup.attr('data-project'), function() {
// bind slideshow
slideshow.render();
$('section#work').css('margin-top', '0px');
});
});
$(document).ready(function() {
hattie.init();
hattie.clickEvents();
hattie.loadImages();
});
$(window).resize(function() {
// get the currently active project, if there is one
if ($('#slideshow').length > 0) {
var activeProject = $('#slideshow').attr('class');
// trigger click
$('hgroup[data-project="'+ activeProject + '"]').trigger('click');
}
});
Try changing:
To:
This will load the content div of the url in $hgroup.attr(‘data-project’).