I have a main page that I am populating with different content based on user selection through Ajax call. I am using Fancy Box that breaks as soon as the page loads the content post Ajax call. I've read all about using .on() but can't seem to get it to work. I am no expert at this kind of stuff in the least.
Here is what I would normally do, that works, prior to Ajax:
<script>
$(document).ready(function() {
$("#june3a, #june3b, #june3c ").fancybox({
'titlePosition' : 'inside',
'transitionIn' : 'none',
'transitionOut' : 'none'
});
});
</script>
and here is what I have trying to use the .on() WHICH doesn't work:
<script>
$(document).on("click", function() {
$("#june3a, #june3b, #june3c ").fancybox({
'titlePosition' : 'inside',
'transitionIn' : 'none',
'transitionOut' : 'none'
});
});
</script>
Any help would be awesome.