// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
//= require bootstrap-sprockets
//= require bootstrap-datepicker/core
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr.js

//= require leaflet.js
//= require d3.min
//= require clipper
//= require concavehull.min
//= require graham_scan.min
//= require leaflet.freedraw
//= require smart_listing
//= require turf
//= require franceconnect

$(document).ready(function() {
    $('.js-scrollTo').on('click', function() { // Au clic sur un élément
        var page = $(this).attr('cible'); // Page cible
        var speed = 600; // Durée de l'animation (en ms)
        $('html, body').animate( { scrollTop: $(page).offset().top-100 }, speed ); // Go
        return false;
    });
});

@@ -1020,34 +1020,98 @@
 ct%0A%0A
-$(document).ready(function
+%0A$(document).on('page:load', scroll_to);%0A$(document).ready(scroll_to);%0A%0Afunction scroll_to
 () %7B
@@ -1153,16 +1153,17 @@
 function
+ 
 () %7B // 
@@ -1330,19 +1330,17 @@
 animate(
- %7B 
+%7B
 scrollTo
@@ -1366,21 +1366,22 @@
 .top
--
+ - 
 100
- 
 %7D, speed
  ); 
@@ -1376,17 +1376,16 @@
 %7D, speed
- 
 ); // Go
@@ -1416,11 +1416,12 @@
    %7D);%0A%7D
-);
+%0A%0A%0A
 %0A

Fix javascript scroll_to