Format old javascript with prettier
This commit is contained in:
parent
af63ad5802
commit
7898a33469
13 changed files with 133 additions and 83 deletions
|
@ -17,23 +17,28 @@
|
|||
//= require bootstrap-wysihtml5
|
||||
//= require bootstrap-wysihtml5/locales/fr-FR
|
||||
|
||||
/* globals $ */
|
||||
|
||||
$(document).on('turbolinks:load', application_init);
|
||||
|
||||
function application_init(){
|
||||
function application_init() {
|
||||
tooltip_init();
|
||||
scroll_to();
|
||||
}
|
||||
|
||||
function tooltip_init() {
|
||||
$('.action_button[data-toggle="tooltip"]').tooltip({delay: { "show": 100, "hide": 100 }});
|
||||
$('[data-toggle="tooltip"]').tooltip({delay: { "show": 800, "hide": 100 }});
|
||||
$('.action_button[data-toggle="tooltip"]').tooltip({
|
||||
delay: { show: 100, hide: 100 }
|
||||
});
|
||||
$('[data-toggle="tooltip"]').tooltip({ delay: { show: 800, hide: 100 } });
|
||||
}
|
||||
|
||||
function scroll_to() {
|
||||
$('.js-scrollTo').on('click', function () { // Au clic sur un élément
|
||||
$('.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 - 200}, speed); // Go
|
||||
$('html, body').animate({ scrollTop: $(page).offset().top - 200 }, speed); // Go
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue