aboutsummaryrefslogtreecommitdiff
path: root/views/default/js/simple_faq/toc.php
blob: 2b1621f88c8b6c3d72511ae32b0948f370c23eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);