Showing reviews on package's details page from Ubuntu
This commit is contained in:
parent
fc95fc9d9a
commit
339bb0427f
10 changed files with 89 additions and 1 deletions
|
|
@ -19,3 +19,21 @@
|
|||
//= require_tree .
|
||||
|
||||
$(function(){ $(document).foundation(); });
|
||||
|
||||
// Load reviews on package's details page
|
||||
load_reviews = function() {
|
||||
// Display message while loading reviews
|
||||
// $('#reviews').html("<i>Loading reviews...</i>");
|
||||
|
||||
// Hide the DIV so that in can be faded in later
|
||||
$('#reviews').hide();
|
||||
|
||||
// The URL is specified in the #reviews's DIV data attribute
|
||||
var url = $('#reviews').attr('data-package-reviews-url');
|
||||
$('#reviews').load(url, null,
|
||||
// Fade in the reviews as soon as the DIV is loaded and filled
|
||||
function(){
|
||||
$(this).fadeIn('slow')
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue