I had a working code that I was transferring from one webpage to another along with the CSS and JS files, but now it's not functioning properly.
<head>
<link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}assets/css/style.css">
<script type="text/javascript" src="{{ STATIC_URL }}assets/js/tablesorter.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}assets/js/script.js"></script>
</head>
<body>
<table id="keywords" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th><span>Serial Number</span></th>
<th><span>Name</span></th>
<th><span>Model</span></th>
</tr>
</thead>
<tbody>
{% for measurement in measurement_list %}
<tr>
<td class="lalign">{{ measurement.set.machine.sn }}</td>
<td>{{ measurement.set.name }}</td>
<td>{{ measurement.set.model }}</td>
<td>{{ measurement.user }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</body>
The JavaScript function tablesorter.js
is included in my header and wrapped by $(document).ready(function)
:
$(function() {
$('#keywords').tablesorter();
});
All the CSS/JS links are correct and identical to the original page. It's puzzling why it's not working now.