[ckan-dev] Adding JS to a template

Florian.Brucker at mb.karlsruhe.de Florian.Brucker at mb.karlsruhe.de
Wed Nov 23 09:55:54 UTC 2016


Hi Timothy,

there are multiple things that could go wrong. You can use your browser 
developer console to check that

- your JS resources are actually loaded
- no error messages are printed to the JS console
- etc.


Regards,
Florian


"ckan-dev" <ckan-dev-bounces at lists.okfn.org> schrieb am 22.11.2016 
16:19:07:

> Von: Timothy Giles <timothy.giles at slu.se>
> An: "'ckan-dev at lists.okfn.org'" <ckan-dev at lists.okfn.org>, 
> Datum: 22.11.2016 16:19
> Betreff: [ckan-dev] Adding JS to a template
> Gesendet von: "ckan-dev" <ckan-dev-bounces at lists.okfn.org>
> 
> 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_______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161123/385fa390/attachment-0003.html>


More information about the ckan-dev mailing list