Skip to content
Snippets Groups Projects

Feature/istwcms 4695 ebremner theme banners

Merged Eric Bremner requested to merge feature/ISTWCMS-4695-ebremner-theme-banners into 3.0.x
5 files
+ 133
56
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 41
41
(function ($, Drupal) {
Drupal.behaviors.cardbanner = {
attach: function (context, settings) {
$(document).ready(function () {
// Step through each FF on the page.
$('.card.banner').each(function () {
// Get the number of items for the carousel, if any.
var num_of_items = 1;
// Add the carousel to the FF using the id.
$('.owl-carousel').owlCarousel({
margin: 10,
nav: true,
navContainerClass: 'uw-owl-nav',
navText:[
'‹ prev',
'next ›'
],
responsiveClass: true,
responsive: {
0: {
items: 1
},
600: {
items: num_of_items <= 2 ? (num_of_items - 1 > 0) ? num_of_items - 1 : 1 : 2
},
1000: {
items: num_of_items
}
}
});
});
});
}
};
})(jQuery, Drupal);
/**
* @file
*/
@@ -297,47 +338,6 @@ else {
}
})(jQuery, Drupal);
(function ($, Drupal) {
Drupal.behaviors.cardbanner = {
attach: function (context, settings) {
$(document).ready(function () {
// Step through each FF on the page.
$('.card.banner').each(function () {
// Get the number of items for the carousel, if any.
var num_of_items = 1;
// Add the carousel to the FF using the id.
$('.owl-carousel').owlCarousel({
margin: 10,
nav: true,
navContainerClass: 'uw-owl-nav',
navText:[
'‹ prev',
'next ›'
],
responsiveClass: true,
responsive: {
0: {
items: 1
},
600: {
items: num_of_items <= 2 ? (num_of_items - 1 > 0) ? num_of_items - 1 : 1 : 2
},
1000: {
items: num_of_items
}
}
});
});
});
}
};
})(jQuery, Drupal);
/**
* @file
*/
Loading