I have following code :-
/*****html*********/
<input type="text" id="firstname">
/******jquery********/
$(document).ready(function(){
   $("#firstname").keyup(function(){
      var text=$(this).val();
      $(this).val(text.replace(/[^\s((a-zA-Z))]/g,''));
   });
});
I don't want any whitespace in my input box.Tried above code but not working. Something wrong in my code. Please help.