Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to make these actions flexible (Jquery) Re: How to make these actions flexible (Jquery)

#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…