Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / views_bootstrap / js / views-bootstrap.js
diff --git a/web/modules/contrib/views_bootstrap/js/views-bootstrap.js b/web/modules/contrib/views_bootstrap/js/views-bootstrap.js
new file mode 100644 (file)
index 0000000..fb645de
--- /dev/null
@@ -0,0 +1,20 @@
+(function ($) {
+
+  'use strict';
+
+  /**
+   * Attaches the behavior to bootstrap carousel view.
+   */
+  Drupal.behaviors.views_bootstrap_carousel = {
+    attach: function (context, settings) {
+      $('.carousel-inner').each(function() {
+        if ($(this).children('div').length === 1) {
+          $(this).siblings('.carousel-control, .carousel-indicators').hide();
+        }
+      });
+    }
+  }
+
+
+
+}(jQuery));
\ No newline at end of file