summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--timelinejs.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/timelinejs.js b/timelinejs.js
new file mode 100644
index 0000000..5996104
--- /dev/null
+++ b/timelinejs.js
@@ -0,0 +1,23 @@
+(function ($) {
+
+ /**
+ * TODO: Pass parameters.
+ */
+ Drupal.behaviors.timelinejs = {
+ attach: function (context, settings) {
+ $('#timeline-embed', context).each( function() {
+ var timeline_config = {
+ width: timelineWidth,
+ height: timelineHeight,
+ source: timelineSource,
+ start_at_end: false,
+ hash_bookmark: true,
+ css: timelineCss,
+ js: timelineJs,
+ lang: timelineLang,
+ }
+ });
+ }
+ };
+
+}(jQuery));