here is how the files are structured... *base.html*
<!DOCTYPE html> <html> <head> ... </head> <body> {% block nav %}{% endblock %} {% block content %}{% endblock %} <script src="{% static " jquery/dist/jquery.min.js " %}"></script> </body> </html> *template.html* {% extends "base.html" %} {% block nav %} {% include 'nav.html' %} {% endblock %} *// works* <script> $(function(){ $('#nav a').on('click', function() { var href = $(this).attr('href'); alert(href); }); }); *nav.html* <div id="nav"> <ul class="nav nav-list"> <li><a href="">Link a</a></li> <li><a href="">Link b</a></li> <li><a href="">Link c</a></li> </ul> </div> *// jquery in included html not working* <script> $(function(){ $('#nav a').on('click', function() { var href = $(this).attr('href'); alert(href); }); }); </script> -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/523f333f-8280-4e57-a1c5-da5ad7be1b4f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.