Hi George:
That code is coming from Divi Theme Support they wrote a special script to display the Divi Full Width Slider on the /events page. I told them that their code appears invalid, that it is throwing an error in Chrome Dev Console; they stated that output.insertAfter is valid code. I will forward your comments to Divi Support Team for feedback, thank you George.