Skip to content

Commit d7cc2de

Browse files
author
jlengstorf
committed
Messing with JS effects.
1 parent 7cd8452 commit d7cc2de

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

index.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
4848
$response = json_decode(curl_exec($ch));
4949
$photos = property_exists($response, 'data') ? $response->data : array();
50-
$next_max_id = property_exists($response, 'pagination') ? $response->pagination->next_max_id : NULL;
50+
$next_min_id = property_exists($response, 'pagination') ? $response->pagination->next_min_id : NULL;
5151

5252
/*
5353
@@ -98,7 +98,7 @@ class="button"
9898
</p>
9999
</div>
100100

101-
<ul id="photos" data-next-max-ID="<?=$next_max_id?>">
101+
<ul id="photos" data-next-min-ID="<?=$next_min_id?>">
102102

103103
<?php foreach ($photos as $photo): ?>
104104
<li>
@@ -155,7 +155,7 @@ class="login button">Login &rarr;</a>
155155
pusher = new Pusher('<?=$pusher_key?>'),
156156
channel = pusher.subscribe('photos'),
157157
photos = $('photos'),
158-
max_ID = photos.data('next-max-ID');
158+
min_ID = photos.data('next-min-ID');
159159

160160
channel.bind('new-photo', function(data){
161161

@@ -182,7 +182,7 @@ class="login button">Login &rarr;</a>
182182
{
183183
'access_token': '<?=$token?>',
184184
'count': 16,
185-
'max_id': max_ID
185+
'min_id': min_ID
186186
}
187187
)
188188
.done(function(response){
@@ -191,8 +191,8 @@ class="login button">Login &rarr;</a>
191191
delay = 0,
192192
anim_speed = 400;
193193

194-
// Sets the new max ID for loading images
195-
max_ID = pagination.next_max_id;
194+
// Sets the new min ID for loading images
195+
min_ID = pagination.next_min_id;
196196

197197
for (x in new_photos) {
198198
var photoCont = $("#photos"),
@@ -207,12 +207,12 @@ class="login button">Login &rarr;</a>
207207
html: img
208208
})
209209
.hide()
210+
.delay(delay)
210211
.prependTo($("#photos"))
211212
.append($('<strong />'), {
212213
text: 'Photo by ' + photo.user.username
213214
})
214215
.wrap('<li />')
215-
.delay(delay)
216216
.show(anim_speed);
217217

218218
delay += anim_speed;

0 commit comments

Comments
 (0)