Skip to content

Commit c00522e

Browse files
author
jlengstorf
committed
JS tweaks.
1 parent 0cb691c commit c00522e

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

Diff for: index.php

+20-19
Original file line numberDiff line numberDiff line change
@@ -188,25 +188,26 @@ class="login button">Login &rarr;</a>
188188
for (x in new_photos) {
189189
var photoCont = $("#photos"),
190190
photo = new_photos[x],
191-
caption = (photo.caption!==null) ? photo.caption.text : '',
192-
img = $('<img />', {
193-
src: photo.images.thumbnail.url,
194-
alt: caption,
195-
load: function(){
196-
var link = $('<a />', {
197-
href: photo.link,
198-
html: this
199-
})
200-
.css({opacity: 0})
201-
.delay(delay)
202-
.prependTo($("#photos"))
203-
.append($('<strong />'), {
204-
text: 'Photo by ' + photo.user.username
205-
})
206-
.wrap('<li />')
207-
.animate({ opacity: 1 }, anim_speed);
208-
}
209-
});
191+
caption = (photo.caption!==null) ? photo.caption.text : '';
192+
193+
$('<img />', {
194+
src: photo.images.thumbnail.url,
195+
alt: caption,
196+
load: function(){
197+
var link = $('<a />', {
198+
href: photo.link,
199+
html: this
200+
})
201+
.css({opacity: 0})
202+
.delay(delay)
203+
.prependTo($("#photos"))
204+
.append($('<strong />'), {
205+
text: 'Photo by ' + photo.user.username
206+
})
207+
.wrap('<li />')
208+
.animate({ opacity: 1 }, anim_speed);
209+
}
210+
});
210211

211212
delay += anim_speed;
212213
}

0 commit comments

Comments
 (0)