-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update review display to show up even in HTML without AJAX
- Loading branch information
Kelsey Langlois and LDevinMacKrell
committed
Dec 7, 2017
1 parent
7e2f6e4
commit 281fa50
Showing
4 changed files
with
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,7 @@ | |
.hidelink { | ||
display: none; | ||
} | ||
|
||
.reviews { | ||
display: none; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
$('#show_reviews_<%= @product.id %>').hide().after("<%= j render('reviews/index') %>"); | ||
$('#show_reviews_<%= @product.id %>').hide(); | ||
$("#reviews-<%= @product.id %>").show(); | ||
$('#hide_reviews_<%= @product.id %>').show().click(function(event) { | ||
event.preventDefault(); | ||
$('#show_reviews_<%= @product.id %>').show(); | ||
$('#hide_reviews_<%= @product.id %>').hide(); | ||
$('#reviews-<%= @product.id %>').remove(); | ||
$('#reviews-<%= @product.id %>').hide(); | ||
}); |