From ff06de174b8f0ecd5bcf8e7d4042b66cc22e50f4 Mon Sep 17 00:00:00 2001 From: Janell-Huyck Date: Thu, 16 Nov 2023 14:39:33 -0500 Subject: [PATCH 1/2] Move bootstrap tooltip initialization to another file --- app/assets/javascripts/application.js | 5 +---- app/assets/javascripts/bootstrap-tooltip-initialization.js | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 app/assets/javascripts/bootstrap-tooltip-initialization.js 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..d4891389 --- /dev/null +++ b/app/assets/javascripts/bootstrap-tooltip-initialization.js @@ -0,0 +1,3 @@ +$(document).on('turbolinks:load', function() { + $('[data-toggle="tooltip"]').tooltip(); +}) \ No newline at end of file From 364de8449731b7c6624278c9c3f9aba592e40bc1 Mon Sep 17 00:00:00 2001 From: Janell-Huyck Date: Thu, 16 Nov 2023 14:43:44 -0500 Subject: [PATCH 2/2] added extra blank line to end of file --- app/assets/javascripts/bootstrap-tooltip-initialization.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/bootstrap-tooltip-initialization.js b/app/assets/javascripts/bootstrap-tooltip-initialization.js index d4891389..911f2f5d 100644 --- a/app/assets/javascripts/bootstrap-tooltip-initialization.js +++ b/app/assets/javascripts/bootstrap-tooltip-initialization.js @@ -1,3 +1,3 @@ $(document).on('turbolinks:load', function() { $('[data-toggle="tooltip"]').tooltip(); -}) \ No newline at end of file +})