egoselfaxis
asked on
Including currency Input mask jquery plugin in custom WordPress plugin
I'm trying to implement this currency input mask functionality in my custom Wordpress plugin:
https://jsfiddle.net/theandybob/t37m0txu/
I see that it requires the "jquery.inputmask.bundle.j s" external resource (which I presume is a JQuery plugin) ... though I can't seem to figure out how to incorporate a reference to it in my plugin.
Ideally, I'd prefer to load the plugin from a CDN. How would I go about doing that? I have the following section in my plugin .. and I just need some help figuring out how to update it so that it loads the plugin from the CDN:
Any help would be appreciated.
Thanks,
- Yvan
https://jsfiddle.net/theandybob/t37m0txu/
I see that it requires the "jquery.inputmask.bundle.j
Ideally, I'd prefer to load the plugin from a CDN. How would I go about doing that? I have the following section in my plugin .. and I just need some help figuring out how to update it so that it loads the plugin from the CDN:
function load_custom_scripts() {
if ( ! wp_script_is( 'my-jquery-ui', 'enqueued' )) {
wp_enqueue_style( 'my-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/humanity/jquery-ui.css',false,'1.11.4','all');
wp_register_script('my-jquery-ui', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js');
wp_enqueue_script( 'my-jquery-ui' );
}
}
add_action( 'admin_enqueue_scripts', 'load_custom_scripts' );
Any help would be appreciated.
Thanks,
- Yvan
ASKER
I already tried that and it isn't working.
I know that because I'm getting a javascript error, ... and when I view the underlying source code and do a "find in page" .. I see no reference to "jquery.inputmask.bundle.j s" at all whatsoever.
- Yvan
I know that because I'm getting a javascript error, ... and when I view the underlying source code and do a "find in page" .. I see no reference to "jquery.inputmask.bundle.j
- Yvan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I figured it out on my own.
Open in new window
after line 4