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

jQuery Minimal Library for BQ Slider Pro #329

Open
jasperf opened this issue Dec 7, 2021 · 2 comments
Open

jQuery Minimal Library for BQ Slider Pro #329

jasperf opened this issue Dec 7, 2021 · 2 comments

Comments

@jasperf
Copy link

jasperf commented Dec 7, 2021

To work with BQ Slider Pro we use jQuery.

window.$ = window.jQuery = require('../../vendor/jquery.min.js')
require('../../vendor/jquery.sliderPro.js')

We do see a lot of the library is not used. About 52% is not used when we check it in Google Lighthouse. Is there a more minimal jQuery package or component we could use instead?

@davidghi
Copy link
Member

davidghi commented Dec 8, 2021

Hi,

You could build a custom version of jQuery that uses only the modules you need. Here is an online tool: http://projects.jga.me/jquery-builder/ Or you could use Grunt: https://github.com/jquery/jquery#modules

Best,
David

@jasperf
Copy link
Author

jasperf commented Dec 9, 2021

Thanks for the tip @davidghi . I knew there had to be something out there. Does this mean that the current BQ Slider Pro uses a bit of all the jQuery modules currently:

  • ajax
  • css
  • deprecated ($.uaMatch, $.browser, $.sub)
  • dimensions
  • effects
  • event-alias
  • offset
  • wrap

That is why you did not pick some modules to work with?

Hmm, I see now that at https://github.com/jquery/jquery#modules you can install things in even more detail to make your jQuery package with Grunt. Again I would need to see what I really need since I use BQ Slider Pro for several slider layouts. Not that we use a lot of effects, but I wonder what I could do without.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants