diff options
Diffstat (limited to 'views/default/js/simple_faq/toc.php')
-rw-r--r-- | views/default/js/simple_faq/toc.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/views/default/js/simple_faq/toc.php b/views/default/js/simple_faq/toc.php new file mode 100644 index 000000000..2b1621f88 --- /dev/null +++ b/views/default/js/simple_faq/toc.php @@ -0,0 +1,24 @@ +<?php +/** + * Show the FAQs' Table of Contents + * + * @package SimpleFAQ + */ + +include(elgg_get_plugins_path() . 'simple_faq/vendors/jquery-stoc/jquery.stoc.js'); + +?> + +elgg.provide('elgg.simple_faq'); + +elgg.simple_faq.init = function() { + $(function(){ + $("<div class="elgg-simplefaq-toc"></div>").prependTo(".elgg-main .elgg-output").stoc({ + search: ".elgg-main .elgg-output", + stocTitle: "", + listType: "ol", + }); + }); +}; + +elgg.register_hook_handler('init', 'system', elgg.simple_faq.init); |