Skip to content
Myr

index.html

This file

Path

examples/jqueryexample/templates/index.html

33 lines · 822 bytes · HTML

Last changed by

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

History of this file

Take it

The walk stopped after 200 commits: lines older than 2053d04 point at it.

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

lines 1–4why, one step back
1{% extends "layout.html" %}
2{% block body %}3<script type=text/javascript>4 $(function() {

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

line 5why, one step back
5 var submit_form = function(e) {

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

lines 6–9why, one step back
6 $.getJSON($SCRIPT_ROOT + '/_add_numbers', {
7 a: $('input[name="a"]').val(),8 b: $('input[name="b"]').val()9 }, function(data) {

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

lines 10–11why, one step back
10 $('#result').text(data.result);
11 $('input[name=a]').focus().select();

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

lines 12–13why, one step back
12 });
13 return false;

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

lines 14–21why, one step back
14 };
1516 $('a#calculate').bind('click', submit_form);1718 $('input[type=text]').bind('keydown', function(e) {19 if (e.keyCode == 13) {20 submit_form(e);21 }

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

line 22why, one step back
22 });

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

lines 23–24why, one step back
23
24 $('input[name=a]').focus();

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

lines 25–27why, one step back
25 });
26</script>27<h1>jQuery Example</h1>

Merge pull request #617 from tony/jquery-example-iteration1Kenneth Reitzbefore adoption17fc38c

lines 28–31why, one step back
28<p>
29 <input type=text size=5 name=a> +30 <input type=text size=5 name=b> =31 <span id=result>?</span>

Improved interface for the URL build error handlerArmin Ronacherbefore adoption2053d04

lines 32–33why, one step back
32<p><a href=# id=calculate>calculate server side</a>
33{% endblock %}