I have a page that has a series of divs in the center and a vertical column on the right. When you click on one of the divs in the center, details about that item show in the vertical column. Initially there is some content in the right column with an image, that when clicked, causes the column to expand and contract.
The problem I have is that when you click on one of the divs in the center and new content is loaded into the right column the .click function that controls the expand/contract no longer works when you click the new image.
Page: goo.gl/aNJ8YP
Code controlling the expand/collapse:
<script>
$('.preview-img-overlay').click(function() {$('.previewPane').toggleClass('expanded-preview');});
</script>
Code controlling the loading of item details into the vertical column:
<script>
$(function () {
$(".clicky").click(function () {
var content_id = $(this).attr('href');
$('#previewContainer').hide().html($(content_id).html()).fadeIn(500);
return false;
});
});
</script>
Any help would be appreciated.