[ckan-dev] Adding JS to a template
Timothy Giles
timothy.giles at slu.se
Tue Nov 22 15:19:07 UTC 2016
Hi all,
So, I am trying to add a 'tablesorter' to a template. To do this I have added the JS file to my fanstatic, added the relevant line in plugins to reference fanstatic, and added a {% resource '/sludcu/..... %} line in to the template as well as the code below.
$(document).ready(function()
{
$('#table').tablesorter();
}
);
Problem is, it is not working and I dont understand why. Both jquery-latest.js and jquery.tablesorter.js are in the fanstatic folder, I am loading the resources at the top of the template file (as above).
Am I missing something really obvious!?
Thanks in advance for your time.
Timothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161122/98ee9e67/attachment-0002.html>
More information about the ckan-dev
mailing list