-
-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #7 : ajout du mode endless
- Loading branch information
1 parent
f3f2bc7
commit 567d19a
Showing
6 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var url = ""; | ||
|
||
function load_more_posts () { | ||
$.get (url, function (data) { | ||
$("#load_more").before ($("#stream .post", data)); | ||
|
||
url = $(".pagination:last li.pager-next a", data).attr ("href"); | ||
if (url === undefined) { | ||
$("#load_more").html ("Il n'y a plus rien à charger"); | ||
$("#load_more").addClass ("disable"); | ||
} | ||
|
||
init_posts (); | ||
}); | ||
} | ||
|
||
$(document).ready (function () { | ||
url = $(".pagination:last li.pager-next a").attr ("href"); | ||
$(".pagination").remove (); | ||
|
||
$("#stream").append ("<a id=\"load_more\" href=\"#\">Charger plus d'articles</a>"); | ||
|
||
$("#load_more").click (function () { | ||
load_more_posts (); | ||
|
||
return false; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters