Skip to content

Commit cd5a4e5

Browse files
author
jlengstorf
committed
JS tweaks.
1 parent b0ae1af commit cd5a4e5

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

index.php

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,22 @@ class="login button">Login &rarr;</a>
191191
caption = (photo.caption!==null) ? photo.caption.text : '',
192192
img = $('<img />', {
193193
src: photo.images.thumbnail.url,
194-
alt: caption
195-
}),
196-
link = $('<a />', {
197-
href: photo.link,
198-
html: img
199-
})
200-
.hide()
201-
.delay(delay)
202-
.prependTo($("#photos"))
203-
.append($('<strong />'), {
204-
text: 'Photo by ' + photo.user.username
205-
})
206-
.wrap('<li />')
207-
.show(anim_speed);
194+
alt: caption,
195+
load: function(){
196+
var link = $('<a />', {
197+
href: photo.link,
198+
html: this
199+
})
200+
.hide()
201+
.delay(delay)
202+
.prependTo($("#photos"))
203+
.append($('<strong />'), {
204+
text: 'Photo by ' + photo.user.username
205+
})
206+
.wrap('<li />')
207+
.show(anim_speed);
208+
}
209+
});
208210

209211
delay += anim_speed;
210212
}

0 commit comments

Comments
 (0)