annotate core-javascript/counters-example.rst @ 201:b6864a86e876 default tip

Przetłumaczone getting-started
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 15 Jul 2012 13:27:27 +0200
parents 0b029e4a12f2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
6523230ac679 counters-example.rst: Included source for example and provided download.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
1 Counters example
6523230ac679 counters-example.rst: Included source for example and provided download.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
2 ================
6523230ac679 counters-example.rst: Included source for example and provided download.
Jonathan Fine <jfine@pytex.org>
parents:
diff changeset
3
33
faff8a586a44 counters-example.rst: Started to display counters.js as code chunks.
Jonathan Fine <jfine@pytex.org>
parents: 32
diff changeset
4 Goal
faff8a586a44 counters-example.rst: Started to display counters.js as code chunks.
Jonathan Fine <jfine@pytex.org>
parents: 32
diff changeset
5 ----
faff8a586a44 counters-example.rst: Started to display counters.js as code chunks.
Jonathan Fine <jfine@pytex.org>
parents: 32
diff changeset
6
45
e16512d188a0 counters-example.rst: Added link to _downloads/counters.html
Jonathan Fine <jfine@pytex.org>
parents: 40
diff changeset
7 The goal is to create a web page which contains several independent
e16512d188a0 counters-example.rst: Added link to _downloads/counters.html
Jonathan Fine <jfine@pytex.org>
parents: 40
diff changeset
8 counters. Each time a counter is clicked, it is incremented. Here's
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
9 you can `try out a working example
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
10 <./core-javascript-work/counters.html>`_ of what's wanted.
45
e16512d188a0 counters-example.rst: Added link to _downloads/counters.html
Jonathan Fine <jfine@pytex.org>
parents: 40
diff changeset
11
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
12 Below is the complete code of this example. To simplify the matter,
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
13 it is completely self-contained. It uses no library code, other than
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
14 the definition of *SimpleClass*.
38
f0e1e6c6bb8a counters-example.rst: Drafted Namespace, Create, Global object.
Jonathan Fine <jfine@pytex.org>
parents: 37
diff changeset
15
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
16 In general library code is a good idea. This example is designed to
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
17 teach you the basics of JavaScript, and not the use of a library. We
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
18 hope that what you learn here will help you choose a library, and
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
19 build libraries of your own.
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
20
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
21
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
22 counters.html
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
23 -------------
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
24
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
25 .. literalinclude:: /core-javascript-work/counters.html
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
26 :language: html
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
27
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
28 counters.css
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
29 ------------
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
30
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
31 .. literalinclude:: /core-javascript-work/counters.css
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
32 :language: css
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
33
58
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
34 counters.js
660cb6581eca counters-example.rst: Deleted much, added all source files and two paras.
Jonathan Fine <jfine@pytex.org>
parents: 45
diff changeset
35 -----------
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
36
126
0b029e4a12f2 Incorporate counters-example.rst into documentation.
Jonathan Fine <jfine@pytex.org>
parents: 125
diff changeset
37 .. literalinclude:: /core-javascript-work/counters.js
39
f38240437168 counters-example.rst: Drafted 'Counter class' and 'Counter properties'
Jonathan Fine <jfine@pytex.org>
parents: 38
diff changeset
38 :language: javascript