fixed dropdown template - only load javascript if actually needed
parent
436b86b7a0
commit
0597a29735
|
|
@ -17,10 +17,12 @@
|
|||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
$('select#{{ title|slugify }}_filter_select').change(function(evt) {
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
})(django.jQuery);
|
||||
</script>
|
||||
{% if choices|slice:"4:" %}
|
||||
<script>
|
||||
(function($) {
|
||||
$('select#{{ title|slugify }}_filter_select').change(function(evt) {
|
||||
window.location.href = $(this).val();
|
||||
});
|
||||
})(django.jQuery);
|
||||
</script>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in New Issue