Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

prevent devault is back

  • Loading branch information...
commit 77b8bbf5b119d2af99e75ebc2313df59ac947dbe 1 parent 6bb5227
Noel Rappin authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 app/assets/javascripts/toggler.js
View
9 app/assets/javascripts/toggler.js
@@ -2,16 +2,17 @@ function init() {
var $toggle_links = $(".detail_toggle");
$toggle_links.click(function() {
$detail = $(this).siblings(".detail");
- if($detail.hasClass("hidden")) {
- $(this).text("Hide Details");
+ if($detail.hasClass("hidden")) {
+ $(this).text("Hide Details");
} else {
$(this).text("Show Details");
}
- $detail.toggleClass("hidden");
+ $detail.toggleClass("hidden");
+ event.preventDefault();
});
}
-$(function() {
+$(function() {
init();
})
Please sign in to comment.
Something went wrong with that request. Please try again.