From 1a5de34b5fd9a83d069cff825b707263ac71765f Mon Sep 17 00:00:00 2001 From: Tony Wang Date: Mon, 29 Sep 2014 15:20:14 +0800 Subject: [PATCH] Update README.md --- README.md | 72 +++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 1df33c5..96837ee 100644 --- a/README.md +++ b/README.md @@ -66,43 +66,43 @@ angular ``` * custom filter * in the view -```html - -[clear] - -``` + ```html + + [clear] +
+ ``` * in the controller -```javascript -.controller('exampleCtrl', function($scope) { - $scope.clearFilter = function() { - $('.filter-status').val(''); - $('.footable').trigger('footable_clear_filter'); - }; - - $scope.filteringEventHandler = function(e) { - var selected = $('.filter-status').find(':selected').text(); - if (selected && selected.length > 0) { - e.filter += (e.filter && e.filter.length > 0) ? ' ' + selected : selected; - e.clear = !e.filter; - } - }; - - $scope.filterByStatus = function() { - $('.footable').trigger('footable_filter', { - filter: $('#filter').val() - }); - }; - - $scope.filter = { - status: null - }; - }) -``` + ```javascript + .controller('exampleCtrl', function($scope) { + $scope.clearFilter = function() { + $('.filter-status').val(''); + $('.footable').trigger('footable_clear_filter'); + }; + + $scope.filteringEventHandler = function(e) { + var selected = $('.filter-status').find(':selected').text(); + if (selected && selected.length > 0) { + e.filter += (e.filter && e.filter.length > 0) ? ' ' + selected : selected; + e.clear = !e.filter; + } + }; + + $scope.filterByStatus = function() { + $('.footable').trigger('footable_filter', { + filter: $('#filter').val() + }); + }; + + $scope.filter = { + status: null + }; + }) + ``` #### paginating paginate table is very easy, follow the demo page of footable is enough * load foot.paginate.js into your app