
By jwaxman on
I think I'm misunderstanding how to get core optional js libraries to load on a page
I'm trying and failing to incorporate a JQuery UI slide effect
Inspecting my page source I can see that:
My hello_world.js is loading.
JQuery and JQuery.ui are loading
JQuery.effects.core and JQuery.effects.slide are not.
What am I doing wrong?
hello_world.libraries.yml
hello_world:
js:
js/hello_world.js: {}
dependencies:
- core/jquery
- core/drupal
- core/jquery.ui
- core/jquery.ui.effects.core
- core/jquery.ui.effects.slide
- core/jquery.once
Comments
JQuery.effects.core and
Maybe because you wrote jquery.ui.effects.core and jquery.ui.effects.slide?
Contact me to contract me for D7 -> D10 migrations.
You should only really need
You should only really need to set:
- core/jquery.ui.effects.slide
...because
jquery.ui.effects.core
is a dependancy of that library and will load automatically.Remember the files are actually called:
I just tested loading only
- core/jquery.ui.effects.slide
and both loaded up first time (of course clear cache etc).Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thanks again! Got it now.
Thanks again! Got it now.