Use CDN for jqueryui
-
Hello!
I really like the plugin, but it adds quite a lot of overhead when it comes to the javascript it uses that slows down our site.
Would it be possible to get the jqueryui though a CDN (code.jquery)?
What I tied:
The function: “public function register_scripts() {” seems to load the scripts and i removed the following lines:
wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-widget'); wp_enqueue_script('jquery-ui-mouse'); wp_enqueue_script('jquery-ui-draggable'); wp_enqueue_script('jquery-ui-droppable');
and replaced them with (i matched the version number rather crudely):
wp_enqueue_script('jquery-ui', 'https://code.jquery.com/ui/1.10.4/jquery-ui.js', false, '1.10.4', false);
After that the slider did show up on the registration form, but not on the comment form.
Is there something I missed or a better way of achieving my goal?
Thank you very much for any help!
- The topic ‘Use CDN for jqueryui’ is closed to new replies.