PHP Classes

File: source/asset/crules/datatables-plugins/api/fnFilterOnReturn.js

Recommend this page to a friend!
  Classes of ask sa sa   Rimau waf   source/asset/crules/datatables-plugins/api/fnFilterOnReturn.js   Download  
File: source/asset/crules/datatables-plugins/api/fnFilterOnReturn.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Rimau waf
Application to configure Web server module options
Author: By
Last change:
Date: 1 year ago
Size: 962 bytes
 

Contents

Class file image Download
/** * This plug-in removes the default behaviour of DataTables to filter on each * keypress, and replaces with it the requirement to press the enter key to * perform the filter. * * @name fnFilterOnReturn * @summary Require the return key to be pressed to filter a table * @author [Jon Ranes](http://www.mvccms.com/) * * @returns {jQuery} jQuery instance * * @example * $(document).ready(function() { * $('.dataTable').dataTable().fnFilterOnReturn(); * } ); */ jQuery.fn.dataTableExt.oApi.fnFilterOnReturn = function (oSettings) { var _that = this; this.each(function (i) { $.fn.dataTableExt.iApiIndex = i; var $this = this; var anControl = $('input', _that.fnSettings().aanFeatures.f); anControl .unbind('keyup search input') .bind('keypress', function (e) { if (e.which == 13) { $.fn.dataTableExt.iApiIndex = i; _that.fnFilter(anControl.val()); } }); return this; }); return this; };