title: Rails turbolinks issues with window.onload
body: <p>I have rails application with baguetteBox library for image popup effect, but it works properly only after page refresh.
  I know that its because of turbolinks so I installed jquery-turbolinks gem but it still doesn't work. //require jquery.turbolinks is in the right spot.</p>
  
  <pre><code>  //
    //= require jquery
    //= require jquery.turbolinks
    //= require jquery_ujs
    //= require baguetteBox.min
    //= require turbolinks
    //= require_tree .
  </code></pre>
  
  <p>And i have this piece of code in the bottom of show view</p>
  
  <pre><code>&lt;script&gt;
     window.onload = function() {
     baguetteBox.run('.step_div');
     };
  &lt;/script&gt;
  </code></pre>
  
  <p>to initialize the script.</p>
  
  <p>Any ideas?</p>