In / javascripts / showlist.js I have (plus a few more not shown)
var interestMap = gets loaded from localStorage... function getInterest(id) { return interestMap[id] || ''; }
My showlist.jade file looks like this: (very simplistic, it is passed in the array of declarations in the variable "shows")
extends layout script(src='/javascripts/showlist.js') block content table#showtable.sortable thead tr td... (column headers such as date and location, many are sortable) tbody each show in shows - var interest = getInterest(show._id); <<< JADE problem here tr td... (various values, including) td =interest
but I get: "undefined is not a function" when I try to call getInterest (). So it is not visible. I also tried a small mod for external javascript
var getInterest = function(id) { ... }
and paste the getInterest code into the line, with no success.
Note that the base layout that it extends has doctype 5 as the first line.
As you call the external (or I even agree to the internal) javascript function from Jade. Or did I miss something simple and stupid? I also tried "../javascripts/showlist.js".
source share