Home › Forums › CSS › How to make these actions flexible (Jquery) › Re: How to make these actions flexible (Jquery)
June 14, 2013 at 6:28 am
#138692
CrocoDillon
Participant
Trying something like:
`var imageContainer = document.getElementById(‘image_container’);
$(‘#gallery_section’).on(‘click’, ‘.gallery_content’, function() {
if ($(this).data(‘type’) == ‘video’)
imageContainer.innerHTML =
‘‘;
else
imageContainer.innerHTML = ‘‘;
});`
which works for images but not for youtube vids…