I have installed jsTree in my bower_components
(using guidlines in this post) and my jade template looks like this -
doctype html
html
head
title= title
script(src='/bower_components/jstree/dist/jstree.min.js')
script(src='/bower_components/jquery/dist/jquery.min.js')
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/bower_components/jstree/dist/themes/default/style.css')
script(src='/javascripts/custom/mytree.js')
body
#mytreediv
ul
li First item
li Second item
The script mytree.js
is a script written by me where I initialize the mytreediv
div element with jsTree. The script looks like this -
alert('Test1');
var myfunc = function () {
alert('Test2');
$('#mytreediv').jstree();
};
myfunc();
Both of the alert
boxes do appear, so I am quite sure that the script is getting linked properly to HTML. But, the div element doesn't look like it is transformed to jsTree.
What am I missing here?