(function($) {
$.fn.arabicOnly = function(options) {
return this.each(function() {
var settings = {
dv: '',
ov: ''
};
if (typeof options == 'object') {
$.extend(settings, options);
}
$(this).keypress(function(e){
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
if (key != 8 && key != ){
if ((key < 0x0600 || key > 0x06FF))
return false;
}
});
});
};
})(jQuery);
$('.onlyletters').arabicOnly();
still under development for other scenarios, but you can use it as it is :)
good luck
Feras Jobeir