ipbr

Script to add mask in input phone the WooCommerce

Nov 7th, 2018 (edited)
2,932
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * WordPress Plugin: Masks Form Fields - https://wordpress.org/plugins/masks-form-fields/
  3.  * JavaScript - Custom script to add mask in input phone the WooCommerce.
  4. */
  5. jQuery(document).ready(function($){
  6.     $("input[name='billing_phone']").mask("(000) 000-0000");
  7. });
  8.  
  9. /**
  10.  * OR only add class to input.
  11. */
  12. jQuery(document).ready(function($){
  13.     $("input[name='billing_phone']").addClass("phone_us");
  14. });
RAW Paste Data