// Happen as soon as the DOM is loaded and before assets are downloaded
jQuery(function ($) {
  $('.js-hide-other-links').hideOtherLinks()
  $('.js-hide-other-departments').hideOtherLinks({ linkElement: 'span', alwaysVisibleClass: '.lead' })

  $('.govspeak').enhanceYoutubeVideoLinks()

  GOVUK.worldLocationFilter.init()
  GOVUK.hideDepartmentChildren.init()
  GOVUK.filterListItems.init()
  GOVUK.showHide.init()
  GOVUK.feeds.init()
})
// These want images to be loaded before they run so the page height doesn't change.
jQuery(window).load(function () {
  GOVUK.backToContent.init()
})

// Happen as soon as the DOM is loaded and before assets are downloaded
jQuery(function ($) {
  $('.js-hide-other-links').hideOtherLinks()
  $('.js-hide-other-departments').hideOtherLinks({ linkElement: 'span', alwaysVisibleClass: '.lead' })

  $('.govspeak').enhanceYoutubeVideoLinks()

  GOVUK.worldLocationFilter.init()
  GOVUK.hideDepartmentChildren.init()
  GOVUK.filterListItems.init()
  GOVUK.showHide.init()
  GOVUK.feeds.init()
})
// These want images to be loaded before they run so the page height doesn't change.
jQuery(window).on('load', function () {
  GOVUK.backToContent.init()
})

Fix removed jQuery function from 3.0
Fix removed jQuery function from 3.0

The .load API was removed in jQuery 3.0 [1] and it is recommended to use
`.on("load")` instead.
