title: $( document ).on('turbolinks:load', function() { not working
body: <p>I'm trying to get my turbolinks document ready to work.  My code is very simple</p>
  
  <pre><code>$( document ).on('turbolinks:load', function() {
    console.log("It works on each visit!")
  })
  </code></pre>
  
  <p>This is using rails 6.  That code is in the middle of my application.js file:</p>
  
  <pre><code>// This file is automatically compiled by Webpack, along with any other files
  // present in this directory. You're encouraged to place your actual application logic in
  // a relevant structure within app/javascript and only use these pack files to reference
  // that code so it'll be compiled.
  // Loads all Semantic javascripts
  //= require jquery
  //= require semantic-ui
  //= require rails-ujs
  //= require activestorage
  //= require turbolinks
  //= require_tree .
  // Uncomment to copy all static images under ../images to the output folder and reference
  // them with the image_pack_tag helper in views (e.g &lt;%= image_pack_tag 'rails.png' %&gt;)
  // or the `imagePath` JavaScript helper below.
  //
  // const images = require.context('../images', true)
  // const imagePath = (name) =&gt; images(name, true)
  
  $(document).on('turbolinks:load', function() {
  $('.message .close')
    .on('click', function() {
      $(this).closest('.message').transition('fade');
    })
  ;
  })
  
  $( document ).on('turbolinks:load', function() {
    console.log("It works on each visit!")
  })
  </code></pre>
  
  <p>I have both jquery and turbolinks gems in my gemfile and bundle has been installed.  Currently no console log is displayed, but there are no error messages either.</p>