Skip to content
Myr

Omit the type attribute of script tag

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Frank Yu · committed by GitHub · parent 922e91b · Browse files · 1 file+3 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−4 removed

  • other:+3 added−4 removed

1 file+3 added−4 removed

modified:docs/patterns/jquery.rst+3 added-4 removed
21 unmodified lines
22to add a script statement to the bottom of your ``<body>`` to load jQuery:2324.. sourcecode:: html2526 <script type=text/javascript src="{{27 url_for('static', filename='jquery.js') }}"></script>26 <script src="{{ url_for('static', filename='jquery.js') }}"></script>2728Another method is using Google's `AJAX Libraries API29<https://developers.google.com/speed/libraries/>`_ to load jQuery:30
26 unmodified lines
57like this:5859.. sourcecode:: html+jinja6062 <script type=text/javascript>61 <script>62 $SCRIPT_ROOT = {{ request.script_root|tojson }};63 </script>6465
41 unmodified lines
107usually a better idea to have that in a separate script file:108109.. sourcecode:: html110112 <script type=text/javascript>111 <script>112 $(function() {113 $('a#calculate').bind('click', function() {114 $.getJSON($SCRIPT_ROOT + '/_add_numbers', {115 a: $('input[name="a"]').val(),
33 unmodified lines