Files
@ 2ba369aa5c5a
Branch filter:
Location: website/www/conservancy/static/img/projects/metalink.svg - annotation
2ba369aa5c5a
7.3 KiB
image/svg+xml
Supporter: js: fade out “Expand All” anchor when all sections expand
The expandable sections can be expanded either one-by-one, or with
the “Expand All” button. Add a counter for each expandable
section (which requires their div's to have 'id' attributes, lest
they be counted in the '__global' section of expandables).
The __global counter will work as advertised if you have no 'id'
attributes on any of your 'expandable-section'-classed div's, but if
you mix a __global without an id with ones that *do* have an id, it's
likely this particular code won't work for that.
Finally, add some documentation which is probably over-documenting
for someone who knows Javascript and jQuery well, but it took me a
while to figure out this code so I felt throwing some notes in there
might be helpful.
The expandable sections can be expanded either one-by-one, or with
the “Expand All” button. Add a counter for each expandable
section (which requires their div's to have 'id' attributes, lest
they be counted in the '__global' section of expandables).
The __global counter will work as advertised if you have no 'id'
attributes on any of your 'expandable-section'-classed div's, but if
you mix a __global without an id with ones that *do* have an id, it's
likely this particular code won't work for that.
Finally, add some documentation which is probably over-documenting
for someone who knows Javascript and jQuery well, but it took me a
while to figure out this code so I felt throwing some notes in there
might be helpful.
81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba 81913e023bba | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="290pt" height="100pt" viewBox="0 0 290 100" version="1.1" id="svg2" inkscape:version="0.47pre4 r22446" sodipodi:docname="Metalink_logo.svg">
<metadata id="metadata48">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id="defs46">
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 62.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="362.5 : 62.5 : 1" inkscape:persp3d-origin="181.25 : 41.666667 : 1" id="perspective50"/>
</defs>
<sodipodi:namedview pagecolor="#000000" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1400" inkscape:window-height="976" id="namedview44" showgrid="false" inkscape:zoom="1.5448276" inkscape:cx="181.25" inkscape:cy="62.5" inkscape:window-x="0" inkscape:window-y="25" inkscape:window-maximized="1" inkscape:current-layer="svg2"/>
<g id="#ff8200ff">
<path fill="#ff8200" opacity="1.00" d=" M 7.44 8.42 C 10.90 3.12 19.44 4.42 22.51 9.45 C 24.13 11.89 24.21 14.91 24.55 17.72 C 28.93 17.85 33.68 17.00 37.66 19.30 C 41.18 21.18 44.21 24.83 43.88 29.02 C 43.60 32.21 41.05 34.60 38.25 35.81 C 40.72 38.73 42.18 43.34 39.47 46.60 C 36.07 51.27 28.90 50.65 24.91 47.11 C 21.67 44.54 20.85 40.28 20.17 36.44 C 14.23 36.96 7.03 35.84 4.09 29.93 C 1.50 25.57 4.76 20.21 9.32 19.02 C 6.65 16.33 4.84 11.77 7.44 8.42 M 8.92 13.98 C 11.82 18.69 18.09 18.17 22.87 17.83 C 21.89 12.83 18.47 7.73 13.03 7.16 C 9.54 6.81 7.01 11.06 8.92 13.98 M 6.34 28.64 C 9.53 32.75 15.26 32.16 19.87 31.86 C 18.88 26.87 15.45 21.67 9.96 21.21 C 6.17 20.88 3.84 25.84 6.34 28.64 M 18.93 22.39 C 20.77 25.18 21.35 28.48 21.58 31.76 C 23.12 31.70 24.67 31.63 26.22 31.57 C 24.50 28.78 23.63 25.62 23.17 22.40 C 21.76 22.40 20.34 22.40 18.93 22.39 M 24.72 22.30 C 26.29 27.79 31.02 32.94 36.92 33.47 C 40.90 34.01 43.81 28.98 41.08 25.92 C 37.14 21.10 30.23 22.13 24.72 22.30 M 21.75 36.33 C 22.77 40.63 25.92 44.10 29.66 46.29 C 32.33 47.77 36.43 48.33 38.40 45.46 C 40.23 42.90 38.46 39.36 35.95 38.01 C 31.69 35.41 26.49 36.22 21.75 36.33 Z" id="path22"/>
</g>
<g id="#0064b5ff">
<path fill="#0064b5" opacity="1.00" d=" M 203.13 22.49 C 206.33 22.50 209.52 22.50 212.71 22.50 C 212.72 25.36 212.72 28.22 212.72 31.09 C 209.52 31.10 206.32 31.10 203.12 31.09 C 203.12 28.22 203.12 25.36 203.13 22.49 Z" id="path25"/>
<path fill="#0064b5" opacity="1.00" d=" M 251.59 22.51 C 254.79 22.48 258.00 22.49 261.20 22.53 C 261.17 31.65 261.19 40.77 261.19 49.89 C 265.26 45.09 269.29 40.26 273.36 35.46 C 276.99 35.47 280.63 35.46 284.26 35.47 C 280.07 40.18 275.81 44.82 271.62 49.53 C 276.15 57.19 280.65 64.87 285.14 72.56 C 281.35 72.57 277.56 72.62 273.78 72.48 C 270.98 67.00 267.94 61.64 265.03 56.23 C 263.75 57.62 262.47 59.00 261.19 60.39 C 261.19 64.45 261.19 68.51 261.17 72.57 C 257.97 72.57 254.78 72.57 251.59 72.55 C 251.60 55.87 251.59 39.19 251.59 22.51 Z" id="path27"/>
<path fill="#0064b5" opacity="1.00" d=" M 190.06 22.50 C 193.26 22.50 196.47 22.50 199.67 22.49 C 199.71 39.18 199.69 55.87 199.69 72.56 C 196.48 72.56 193.27 72.57 190.07 72.57 C 190.04 55.88 190.06 39.19 190.06 22.50 Z" id="path29"/>
<path fill="#0064b5" opacity="1.00" d=" M 225.47 40.80 C 229.41 34.40 238.67 33.23 244.66 37.27 C 248.65 40.17 248.96 45.49 249.07 49.99 C 249.04 57.52 249.13 65.06 249.00 72.59 C 245.81 72.56 242.62 72.56 239.44 72.56 C 239.39 65.05 239.50 57.53 239.40 50.01 C 239.41 47.63 238.78 44.71 236.33 43.70 C 233.21 42.43 229.18 43.16 227.01 45.83 C 225.42 47.85 225.55 50.57 225.48 53.00 C 225.51 59.52 225.50 66.04 225.50 72.55 C 222.27 72.59 219.04 72.59 215.81 72.48 C 215.96 60.15 215.83 47.81 215.88 35.47 C 219.09 35.46 222.29 35.46 225.50 35.47 C 225.50 37.25 225.49 39.02 225.47 40.80 Z" id="path31"/>
<path fill="#0064b5" opacity="1.00" d=" M 203.12 35.50 C 206.32 35.50 209.51 35.50 212.71 35.49 C 212.73 47.85 212.72 60.21 212.72 72.56 C 209.52 72.57 206.32 72.57 203.13 72.57 C 203.11 60.21 203.13 47.86 203.12 35.50 Z" id="path33"/>
</g>
<g id="#000000ff">
<path fill="#000000" opacity="1.00" d=" M 137.50 26.28 C 140.71 26.28 143.91 26.28 147.12 26.28 C 147.12 29.60 147.13 32.92 147.13 36.24 C 148.91 36.25 150.69 36.25 152.47 36.25 C 152.47 38.38 152.47 40.50 152.47 42.62 C 150.69 42.63 148.91 42.63 147.13 42.63 C 147.25 50.03 146.88 57.44 147.30 64.83 C 147.55 67.42 150.71 66.66 152.48 66.81 C 152.47 69.00 152.47 71.19 152.47 73.38 C 148.55 73.95 144.07 74.82 140.58 72.40 C 137.85 70.57 137.55 67.00 137.50 64.01 C 137.48 56.88 137.51 49.76 137.50 42.63 C 135.92 42.63 134.35 42.62 132.78 42.62 C 132.78 40.50 132.78 38.37 132.78 36.25 C 134.35 36.25 135.92 36.25 137.49 36.24 C 137.50 32.92 137.50 29.60 137.50 26.28 Z" id="path36"/>
<path fill="#000000" opacity="1.00" d=" M 55.16 40.05 C 59.87 33.38 71.12 33.02 75.48 40.22 C 79.72 34.31 88.78 33.20 94.46 37.60 C 97.51 40.13 98.09 44.28 98.12 48.00 C 98.14 56.19 98.12 64.38 98.12 72.57 C 94.91 72.56 91.71 72.56 88.50 72.56 C 88.39 64.07 88.70 55.55 88.36 47.07 C 87.96 42.81 82.20 42.06 79.32 44.30 C 77.21 45.78 76.73 48.52 76.71 50.93 C 76.64 58.14 76.72 65.35 76.69 72.56 C 73.48 72.56 70.27 72.56 67.06 72.57 C 66.95 64.04 67.27 55.50 66.91 46.98 C 66.69 43.71 62.77 42.47 60.04 43.32 C 56.87 43.94 55.26 47.30 55.33 50.30 C 55.20 57.72 55.32 65.14 55.28 72.56 C 52.07 72.57 48.86 72.57 45.65 72.56 C 45.66 60.19 45.65 47.83 45.66 35.47 C 48.84 35.47 52.01 35.47 55.19 35.47 C 55.19 36.99 55.18 38.52 55.16 40.05 Z" id="path38"/>
<path fill="#000000" opacity="1.00" d=" M 105.00 39.95 C 111.94 32.23 126.21 33.62 131.49 42.58 C 134.25 46.86 134.47 52.10 134.57 57.03 C 126.25 57.04 117.93 57.02 109.61 57.04 C 109.97 59.71 109.91 62.89 112.23 64.75 C 116.01 68.24 122.69 66.86 124.81 62.14 C 127.92 62.11 131.03 62.12 134.15 62.13 C 131.04 72.38 118.02 76.98 108.77 72.22 C 103.52 69.60 100.72 63.77 100.23 58.13 C 99.64 51.82 100.61 44.83 105.00 39.95 M 109.73 50.65 C 114.70 50.66 119.66 50.68 124.63 50.64 C 124.59 46.06 120.82 41.57 115.96 42.38 C 111.79 42.72 110.31 47.15 109.73 50.65 Z" id="path40"/>
<path fill="#000000" opacity="1.00" d=" M 163.72 35.86 C 169.76 34.66 176.85 34.20 182.17 37.82 C 187.50 41.88 185.59 49.27 185.94 55.03 C 186.48 60.81 184.24 67.60 188.56 72.36 C 184.89 72.73 181.19 72.53 177.51 72.56 C 177.15 71.36 176.82 70.16 176.51 68.95 C 173.24 72.22 168.65 74.78 163.88 73.90 C 159.80 73.47 155.70 70.78 154.67 66.65 C 153.46 62.09 154.47 56.33 158.76 53.71 C 163.50 50.70 169.43 51.15 174.58 49.35 C 177.03 48.30 177.22 44.39 174.67 43.34 C 170.75 41.72 164.47 42.47 164.07 47.71 C 161.00 47.73 157.94 47.73 154.87 47.71 C 155.19 42.46 158.32 37.11 163.72 35.86 M 163.83 60.91 C 162.68 66.21 169.80 67.68 173.20 65.15 C 176.55 63.00 176.49 58.61 176.66 55.10 C 172.53 56.99 165.47 55.65 163.83 60.91 Z" id="path42"/>
</g>
</svg>
|