Skip to content
Browse files

prevent devault is back

  • Loading branch information...
1 parent 6bb5227 commit 77b8bbf5b119d2af99e75ebc2313df59ac947dbe Noel Rappin committed Sep 30, 2012
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();
})

0 comments on commit 77b8bbf

Please sign in to comment.
Something went wrong with that request. Please try again.