jquery maskedinput. How to check availability of the mask -


can me checking availability of mask. use one:

if ($.isfunction($("#id").mask)){     var val = $("#id").mask(); } else {     var val = document.getelementbyid(id).value; } 

but condition true. don't matter written with:

$(document).ready(function(){   $("#id").mask("8 (999) 999-9999"); } 

or not.

if you're trying verify if .mask() function available, should try checking $.fn.mask.

if you're trying verify whether element has mask, test if $("#element").data("rawmaskfn") defined.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -