From 79eb9e333635298185aaddecc58d45a1d3f7fdd2 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Tue, 13 Dec 2011 16:07:32 +0900 Subject: [PATCH] make JSLint compatible --- jquery.table-filter.js | 60 ++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/jquery.table-filter.js b/jquery.table-filter.js index 68f1a7e..d85ad9a 100644 --- a/jquery.table-filter.js +++ b/jquery.table-filter.js @@ -1,16 +1,21 @@ -/*! - * jQuery Plugin: Table Filter - version 0.1.2 - * http://github.com/hail2u/jquery.table-filter - * Insert a input form for filtering table rows dinamically. +/** + * @preserve jQuery Plugin: Table Filter - version 0.2 * - * Copyright (c) 2009 Kyo Nagashima - * This library licensed under MIT license: - * http://opensource.org/licenses/mit-license.php + * LICENSE: http://hail2u.mit-license.org/2009 */ -(function($) { +/*jslint indent: 2, browser: true, regexp: true */ +/*global jQuery, $ */ + +(function ($) { + "use strict"; + $.fn.addTableFilter = function (options) { - var o = $.extend({}, $.fn.addTableFilter.defaults, options); + var o = $.extend({}, $.fn.addTableFilter.defaults, options), + tgt, + id, + label, + input; if (this.is("table")) { // Generate ID @@ -19,14 +24,14 @@ id: "t-" + Math.floor(Math.random() * 99999999) }); } - var tgt = this.attr("id"); - var id = tgt + "-filtering"; + tgt = this.attr("id"); + id = tgt + "-filtering"; // Build filtering form - var label = $("