masked input: I can't get the simplest completion to work
Posted
by Karl Messner
on Stack Overflow
See other posts from Stack Overflow
or by Karl Messner
Published on 2010-04-28T21:57:34Z
Indexed on
2010/04/28
22:07 UTC
Read the original article
Hit count: 482
Trying to use Josh Bush's masked input plugin.
I want to shift focus and do other things once the person puts their cell phone in. I mask to a phone shape. When I hit the last letter, I want it to trigger a javascript function. Right now that function just alerts hi. But I can't get it to work:
function jump(){
alert('hi');
}
$(document).ready(function(){
$("#cellphone").focus();
jQuery(function($){
$("#product").mask("(999) 999-9999",{completed:function(){jump();}});
});
});
© Stack Overflow or respective owner