akzhan / Jquery Keyfilter
This plugin filters keyboard input by specified regular expression.
Stars: ✭ 37
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Jquery Keyfilter
Selectpage
A simple style and powerful selector, including ajax remote data, autocomplete, pagination, tags, i18n and keyboard navigation features
Stars: ✭ 679 (+1735.14%)
Mutual labels: keyboard, jquery-plugin
Framecarousel
A jQuery plugin for quickly creating carousels within frames
Stars: ✭ 14 (-62.16%)
Mutual labels: jquery-plugin
Mechanical Keyboard
DIY mechanical keyboard and where to find them
Stars: ✭ 947 (+2459.46%)
Mutual labels: keyboard
Gtm In Viewport Manager
A manager of in-viewport events for GTM (Google Tag Manager).
Stars: ✭ 20 (-45.95%)
Mutual labels: jquery-plugin
Typing Assistant
Typing Assistant provides the ability to autocomplete words and suggests predictions for the next word. This makes typing faster, more intelligent and reduces effort.
Stars: ✭ 32 (-13.51%)
Mutual labels: keyboard
Viewer
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-viewer
Stars: ✭ 985 (+2562.16%)
Mutual labels: jquery-plugin
Silence
A simple, clean macro recorder written in C#. Windows 10 compatible.
Stars: ✭ 29 (-21.62%)
Mutual labels: keyboard
Voyager65 Keyplus
65% keyboard PCB for Keyplus firmware. Simplified variants available.
Stars: ✭ 29 (-21.62%)
Mutual labels: keyboard
Sticky Nav
A jQuery plugin make the navbar sticky, smart anchor link highlighting, smooth scrolling. Simple and powerful.
Stars: ✭ 21 (-43.24%)
Mutual labels: jquery-plugin
Gridstrap.js
gridstrap.js is a jQuery plugin designed to take Bootstrap's CSS grid system and turn it into a managed draggable and resizeable grid while truely maintaining its responsive behaviour.
Stars: ✭ 32 (-13.51%)
Mutual labels: jquery-plugin
Sodieremojikeyboardplus
支持自定义emoji表情,icon font , FontAwesome,斜体,超链接,粗体,下划线,字体,颜色,镂空字体等富文本
Stars: ✭ 14 (-62.16%)
Mutual labels: keyboard
Chrome Virtual Keyboard
Touch-friendly Virtual Keyboard for Chrome browser
Stars: ✭ 35 (-5.41%)
Mutual labels: keyboard
Infinite Scroll
📜 Automatically add next page
Stars: ✭ 7,006 (+18835.14%)
Mutual labels: jquery-plugin
Armory Keyboard
utility for emulating a USB HID keyboard with the USBArmory
Stars: ✭ 28 (-24.32%)
Mutual labels: keyboard
Parallax background
jQuery parallax background plugin based on GSAP
Stars: ✭ 30 (-18.92%)
Mutual labels: jquery-plugin
Jquery Sse
jQuery Plugin for Server-Sent Events (SSE) EventSource Polyfill
Stars: ✭ 37 (+0%)
Mutual labels: jquery-plugin
Jquery.tabslideout.js
jQuery plugin to create a side/top/bottom tab that slides out to show a feedback form, contact form, notepad etc.
Stars: ✭ 35 (-5.41%)
Mutual labels: jquery-plugin
Introduction
This jQuery plugin filters keyboard input by specified regular expression.
Source code inspired by Ext.JS (Ext.form.TextField, Ext.EventManager), but was modified to provide more accurate logic.
Procedural style
$("#ggg").keyfilter(/[\dA-F]/);
Also you can pass test function instead of regexp. Its arguments:
- this - HTML DOM Element (event target).
- c - String that contains incoming character.
$("#ggg").keyfilter(function(c) { return c != 'a'; });
CSS class attribute style
<input type="text" class="mask-num" />
Inputs with CSS classes like this will automatically have the corresponding regexp below applied.
Predefined classes with its regexps
- mask-pint:
/[\d]/
- mask-int:
/[\d\-]/
- mask-pnum:
/[\d\.]/
- mask-num:
/[\d\-\.]/
- mask-hex:
/[0-9a-f]/i
- mask-email:
/[a-z0-9_\.\[email protected]]/i
- mask-alpha:
/[a-z_]/i
- mask-alphanum:
/[a-z0-9_]/i
Using different classes
You can apply these standard regexps to different classes if you wish.
$("input.integer").keyfilter($.fn.keyfilter.defaults.masks.int)
Extensibility
Keyfilter supports extending and changing of list of provided masks.
Example of extending
/*
* Key filter masks for hosting.
*/
(function($)
{
var hostingMasks = {
dir: /[a-z0-9_\/\-\.]/i,
ftpuser: /[a-z0-9_]/
};
$.extend($.fn.keyfilter.defaults.masks, hostingMasks);
})(jQuery);
Override built-in masks to allow french accents
/*
* Key filter masks supporting french accents.
*/
(function($)
{
$.extend($.fn.keyfilter.defaults.masks, {
alpha: /[a-zéèçàêoe_]/i,
alphanum: /[a-zéèçàêoe0-9_]/i
});
})(jQuery);
Overriding
You can fully override masks by simple assignment after the plugin loads but before the document.ready
event fires.
$.fn.keyfilter.defaults.masks = { ... };
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].