Add JSHint stuff. [skip ci]

This commit is contained in:
James Cole
2015-05-24 18:22:41 +02:00
parent 285b77dcb7
commit 8daccbfbb4
13 changed files with 112 additions and 58 deletions

View File

@@ -1,3 +1,14 @@
// Return a helper with preserved width of cells
var fixHelper = function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function (index) {
// Set helper cell sizes to match the original sizes
$(this).width($originals.eq(index).width());
});
return $helper;
};
$(function () {
$('.addMoney').on('click', addMoney);
$('.removeMoney').on('click', removeMoney);
@@ -31,16 +42,7 @@ $(function () {
);
});
// Return a helper with preserved width of cells
var fixHelper = function(e, tr) {
var $originals = tr.children();
var $helper = tr.clone();
$helper.children().each(function (index) {
// Set helper cell sizes to match the original sizes
$(this).width($originals.eq(index).width());
});
return $helper;
}
function addMoney(e) {
var pigID = parseInt($(e.target).data('id'));