Last active
          September 6, 2016 08:54 
        
      - 
      
- 
        Save max-kk/85ae495a82e43403c7f4359441eb317b to your computer and use it in GitHub Desktop. 
    maskedinput_async
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | jQuery.cachedScript = function( url, options ) { | |
| // Allow user to set any option except for dataType, cache, and url | |
| options = $.extend( options || {}, { | |
| dataType: "script", | |
| cache: true, | |
| url: url | |
| }); | |
| // Use $.ajax() since it is more flexible than $.getScript | |
| // Return the jqXHR object so we can chain callbacks | |
| return jQuery.ajax( options ); | |
| }; | |
| jQuery.cachedScript("//cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.min.jss").done(function() { | |
| $("input[name='phone']").mask("38 (099) 999-99-99"); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment