diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 75363cd7..f3577e48 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -17,10 +17,7 @@ //= require jquery3 //= require popper //= require bootstrap-sprockets - -$(document).on('turbolinks:load', function() { - $('[data-toggle="tooltip"]').tooltip(); -}) +//= require bootstrap-tooltip-initialization function addAuthor(type, count) { var count = count || 1; diff --git a/app/assets/javascripts/bootstrap-tooltip-initialization.js b/app/assets/javascripts/bootstrap-tooltip-initialization.js new file mode 100644 index 00000000..911f2f5d --- /dev/null +++ b/app/assets/javascripts/bootstrap-tooltip-initialization.js @@ -0,0 +1,3 @@ +$(document).on('turbolinks:load', function() { + $('[data-toggle="tooltip"]').tooltip(); +})