Created
January 13, 2012 01:54
-
-
Save patrickgombert/1604213 to your computer and use it in GitHub Desktop.
Bad Javascript
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
var hider = function() { | |
$("#some_div").hide(); | |
} | |
var shower = function() { | |
$("#some_div").show(); | |
} | |
var total_column = function() { | |
var total = 0; | |
(".important_column").children().each(function() { | |
total += this.val(); | |
} | |
return total; | |
} | |
$(function() { | |
$("#some_button").bind('click', hider); | |
$("#some_other_button").bind('click', shower); | |
$("form").bind('submit', $("#feedback").html(total_column())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment