Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update slick js? #3538

Closed
stratboy opened this issue Feb 21, 2018 · 3 comments
Closed

How to update slick js? #3538

stratboy opened this issue Feb 21, 2018 · 3 comments
Labels
request/enhancement Indicates an Enhancement Request for an existing feature.
Milestone

Comments

@stratboy
Copy link
Contributor

Hi, I see that elementor is currently shipped with Slick js v1.6.0, which is an old one. For other things and full mobile support, I need latest 1.8.0. I'd like not to load it twice, though. Which is the best practice for override/upgrade js dependencies?

Thank you

@stratboy
Copy link
Contributor Author

add_action('elementor/frontend/after_register_scripts', function() {
  wp_deregister_script('jquery-slick');
  wp_register_script('jquery-slick',get_stylesheet_directory_uri() . '/bower_components/slick-carousel/slick/slick.min.js',['jquery',],'1.8.0',true);
},15);

Probably..

@arielk arielk added this to the 2.0.0 milestone Feb 21, 2018
@bainternet bainternet added the request/enhancement Indicates an Enhancement Request for an existing feature. label Feb 22, 2018
@KingYes
Copy link
Member

KingYes commented Feb 22, 2018

Thanks

@stratboy
Copy link
Contributor Author

Mmmm I still have some doubts. When is Slick loaded in frontend?

If I just log console.log('Slick') I get undefined.

Is it always loaded or only if required by in page widgets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/enhancement Indicates an Enhancement Request for an existing feature.
Projects
None yet
Development

No branches or pull requests

4 participants