Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gethugothemes/dot-hugo-documentation-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/script.js')
-rw-r--r--assets/js/script.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/assets/js/script.js b/assets/js/script.js
new file mode 100644
index 0000000..d2fd3b4
--- /dev/null
+++ b/assets/js/script.js
@@ -0,0 +1,19 @@
+(function ($) {
+ 'use strict';
+
+ // Background-images
+ $('[data-background]').each(function () {
+ $(this).css({
+ 'background-image': 'url(' + $(this).data('background') + ')'
+ });
+ });
+
+
+ // Accordions
+ $('.collapse').on('shown.bs.collapse', function () {
+ $(this).parent().find('.ti-plus').removeClass('ti-plus').addClass('ti-minus');
+ }).on('hidden.bs.collapse', function () {
+ $(this).parent().find('.ti-minus').removeClass('ti-minus').addClass('ti-plus');
+ });
+
+})(jQuery); \ No newline at end of file