-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SITE: added an examples folder to store the various useful examples o…
…f actions on the website
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
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,71 @@ | ||
<?php | ||
|
||
/* | ||
This examples illustrates the unroll comments function | ||
sources: | ||
- http://www.9lessons.info/2009/12/display-collapsed-comments-like.html | ||
- http://jsfiddle.net/clemsos/HFqST/22/ | ||
*/ | ||
|
||
?> | ||
|
||
<html> | ||
<head> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> | ||
|
||
<script> | ||
// var BASE URL = 'http://refresh.org'; | ||
var ACTIONS_URL = 'http://refresh.nouvelingenieur.fr/index.php'; | ||
|
||
$('.speccom').click(function() { | ||
|
||
var url = ACTIONS_URL + $(this).attr("href"); | ||
|
||
// show that is working | ||
$('.loader').html('Loading posts from : ' + url); | ||
|
||
// load posts | ||
$.ajax( | ||
{ | ||
url: url, | ||
success: function(rep) | ||
{ | ||
$('.placeholder').html(rep); | ||
} | ||
}); | ||
|
||
|
||
|
||
return false; | ||
|
||
}); | ||
</script> | ||
|
||
<style media="screen" type="text/css"> | ||
.newsformcomment { | ||
padding:10px; | ||
border:solid 1px #ccc; | ||
margin: 30px 5px; | ||
width: 300px | ||
} | ||
</style> | ||
|
||
</head> | ||
|
||
|
||
<body> | ||
|
||
<a class='speccom' href="?action=unrollcomment&order=0&thread_id=27#a27"> | ||
<span class="newslinkcomment_roll">2 comments</span> | ||
</a> | ||
|
||
|
||
<div class='loader'></div> | ||
|
||
<div class="newsformcomment"> | ||
|
||
<p>Here goes the comments</p> | ||
</div> | ||
|
||
</body> | ||
</html> |