Mercurial > mozilla-the-big-picture
annotate mbp.js @ 37:ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 11 Dec 2009 16:18:38 -0800 |
parents | 2c5d734e1d2c |
children | 124129f5c74a |
rev | line source |
---|---|
8
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
1 $(window).ready( |
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
2 function() { |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
3 var containerWidth = $("#container").width(); |
8
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
4 var rectRegexp = /rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)/; |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
5 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
6 // Each entry may have multiple resolutions of the same image; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
7 // choose the one that's best for our display device, and |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
8 // make sure we have a clipping area for its thumbnail. |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
9 $(".mbp-entry").each( |
26
a4dec75deee8
mousing over h1 removes full-size image, clicking on full-size image opens thumbnail's link
Atul Varma <varmaa@toolness.com>
parents:
24
diff
changeset
|
10 function() { |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
11 var images = $(this).find("img"); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
12 var lastClip = null; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
13 var best = null; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
14 images.each( |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
15 function() { |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
16 var clip = $(this).css("clip"); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
17 if (clip != "auto") |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
18 lastClip = this; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
19 if (best) { |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
20 // The "best" image is the lowest-resolution image |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
21 // that's still bigger than the width of our container: |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
22 // this way we never upscale, but we also don't waste |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
23 // bandwidth getting a massive image that we won't |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
24 // see. |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
25 if (this.width < best.width && |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
26 this.width >= containerWidth) { |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
27 best = this; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
28 } |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
29 } else |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
30 best = this; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
31 }); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
32 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
33 // If our best image doesn't have a CSS clipping rect associated |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
34 // with it, we'll use the scaled clipping rect of another |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
35 // resolution. |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
36 if ($(best).css("clip") == "auto" && lastClip) { |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
37 var scaling = best.width / lastClip.width; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
38 var parts = $(lastClip).css("clip").match(rectRegexp); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
39 if (!parts) |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
40 throw new Error("Invalid 'clip' CSS for " + lastClip.src); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
41 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
42 var newParts = []; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
43 for (var i = 1; i <= 4; i++) |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
44 newParts.push(Math.floor(parts[i] * scaling) + "px"); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
45 $(best).css({clip: "rect(" + newParts.join(", ") + ")"}); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
46 } |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
47 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
48 // Remove all the non-ideal images we don't need. |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
49 images.each(function() { if (this != best) $(this).remove(); }); |
26
a4dec75deee8
mousing over h1 removes full-size image, clicking on full-size image opens thumbnail's link
Atul Varma <varmaa@toolness.com>
parents:
24
diff
changeset
|
50 }); |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
51 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
52 var images = $(".mbp-entry img"); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
53 var loadsLeft = images.length; |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
54 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
55 // Create the thumbnails and attach event handlers to them. |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
56 images.each( |
8
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
57 function() { |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
58 function onLoaded() { |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
59 $("#countdown").text(--loadsLeft); |
16
3975d48d6126
better padding for picture titles
Atul Varma <varmaa@toolness.com>
parents:
13
diff
changeset
|
60 |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
61 var siblings = [this.previousSibling, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
62 this.nextSibling]; |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
63 for (var i = 0; i < siblings.length; i++) |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
64 if (siblings[i] && |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
65 siblings[i].isElementContentWhitespace) |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
66 $(siblings[i]).remove(); |
16
3975d48d6126
better padding for picture titles
Atul Varma <varmaa@toolness.com>
parents:
13
diff
changeset
|
67 |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
68 var clip = $(this).css("clip"); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
69 var parts = clip.match(rectRegexp); |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
70 if (!parts) |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
71 throw new Error("Invalid 'clip' CSS for " + this.src); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
72 |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
73 var crop = {top: parts[1], |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
74 right: parts[2], |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
75 bottom: parts[3], |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
76 left: parts[4]}; |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
77 crop.width = crop.right - crop.left; |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
78 crop.height = crop.bottom - crop.top; |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
79 var canvas = document.createElement("canvas"); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
80 var self = $(this.parentNode).clone(); |
36
2c5d734e1d2c
Allow max-width/max-height of CSS to propagate.
Atul Varma <varmaa@toolness.com>
parents:
30
diff
changeset
|
81 |
2c5d734e1d2c
Allow max-width/max-height of CSS to propagate.
Atul Varma <varmaa@toolness.com>
parents:
30
diff
changeset
|
82 // Allow max-width/max-height of CSS to propagate. |
2c5d734e1d2c
Allow max-width/max-height of CSS to propagate.
Atul Varma <varmaa@toolness.com>
parents:
30
diff
changeset
|
83 self.find("img").removeAttr("width").removeAttr("height"); |
2c5d734e1d2c
Allow max-width/max-height of CSS to propagate.
Atul Varma <varmaa@toolness.com>
parents:
30
diff
changeset
|
84 |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
85 $(canvas).mouseenter( |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
86 function() { |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
87 $("#big-picture").empty(); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
88 $("#big-picture").append(self); |
28
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
89 }); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
90 $(canvas).addClass("thumbnail"); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
91 $(this).before(canvas); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
92 var ctx = canvas.getContext("2d"); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
93 ctx.drawImage(this, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
94 crop.left, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
95 crop.top, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
96 crop.width, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
97 crop.height, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
98 0, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
99 0, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
100 canvas.width, |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
101 canvas.height); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
102 $(this).remove(); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
103 if (loadsLeft == 0) { |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
104 $("#countdown").remove(); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
105 $("#container").fadeIn(); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
106 } |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
107 } |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
108 |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
109 if (this.complete) |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
110 onLoaded.call(this); |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
111 else |
fd3973fcd1a1
hopefully fixed things so this should work over http rather than just file:.
Atul Varma <varmaa@toolness.com>
parents:
26
diff
changeset
|
112 this.addEventListener("load", onLoaded, false); |
8
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
113 }); |
37
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
114 |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
115 $("h1").mouseover( |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
116 function() { |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
117 $("#big-picture").empty(); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
118 }); |
ddab6ae20001
The best image for display is now chosen dynamically based on display resolution, rather than depending on the large/small CSS class metadata.
Atul Varma <varmaa@toolness.com>
parents:
36
diff
changeset
|
119 |
13
317fba5f0d11
Added header and 'countdown' timer as images load.
Atul Varma <varmaa@toolness.com>
parents:
10
diff
changeset
|
120 $("#countdown").text(loadsLeft); |
8
cd71f59b38f4
Added initial mozilla: the big picture page.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
121 }); |