Footnotes + Wp rocket
-
Hello,
There is a way to make works Footnotes with Wp Rocket?
When I enable JS minify + defer Footnotes stop to works.The only workaround I found is to exclude from minify/defer /jquery.min.js
There is another way?
Thanks-
This topic was modified 5 years, 3 months ago by
hopper87it.
-
This topic was modified 5 years, 3 months ago by
-
Hello @hopper87it,
Thanks for reaching out.
jquery.min.jsis jQuery Core shipped natively with WordPress, and needed by the Footnotes plugin. Probably you shouldn’t defer it, and as it’s already minified, you’d probably be fine by doing what you did: exclude it from minify and defer.Sadly I haven’t a chance to run a test because I’m not subscribed to the caching plugin. Should you encounter any performance issues due to this exclusion, please be sure to keep in touch so we can try to investigate the issue further.
Best regards.
Hi, thanks for your answer.
It is a problem for me because without defer and minify it impact my perfomance on google speed test (jquery is heavy), and the only plugin affected from jquery minify/defer is yours.Best
Hi,
You may defer jQuery and get Footnotes to work by taking two steps:
- Enable hard links, under the General settings tab > Scrolling behavior > Enable hard links.
- Enable alternative tooltips, under the Referrers and tooltips tab > Tooltips > Display alternative tooltips.
#1 ensures that scrolling still works when jQuery is out. In Footnotes, hard-link driven scrolling is fully functional by keeping the same, configurable scroll offset, so that usability is not affected. Just the scrolling won’t be animated any longer, which is not much of an issue because the outcome is intuitive (down, up, no surprise). The downside of cluttering the browsing history can be avoided by using the backbutton instead of the backlinks. That is hinted by the small tooltips on the backlinks when hard links are enabled. These tooltips can be disabled, and the tooltip text is configurable.
#2 makes sure tooltips display without jQuery UI, using a small internal script for display/hide, and CSS transitions for fade-in/out with the same settings (fade-in delay and duration, fade-out delay and duration). The downside is that these tooltips neither shrink to adapt to a short tooltip text (didn’t find out how to achieve it) nor resize to adapt to the window. Therefore, best is to use a page layout with a sidepane or widget area (or two) to the left or (and) to the right, and to position the tooltips accordingly to the left or to the right of the referrers.
Hi I done it but unfortunately doesnt works
when I try to open the reference title to open the footnotes doesnt works and I see in console this error
Uncaught ReferenceError: footnote_expand_collapse_reference_container_17840_1 is not defined at HTMLSpanElement.onclick ((index):733)-
This reply was modified 5 years, 3 months ago by
hopper87it.
Hi, Sorry please, I forgot to mention that additionally, the reference container mustn’t be collapsed by default.
Now I see that you need a collapsed reference container. If there is a way to do this without jQuery, we’ll let you know and fast-track a new bugfix release (2.5.6).
Thank you for reporting this issue!
-
This reply was modified 5 years, 3 months ago by
pewgeuges.
We got the reference container to work with plain JavaScript and just need to work on the styles and a setting to enable this as an option.
We’ll keep you informed when the fix is released!
@pewgeuges – Thanks for the detailed explanation and I am having the exact same issue. Found it in search so I am glad that I didnt open a duplicate one.
Look forward to the fix.
Hello @pkverma99,
Thanks for joining in. The bugfix version 2.5.6 is currently in limbo. It works very well for me: There is a new setting in the dashboard under the General Settings tab > Reference container > Script mode, below the Collapse by default. When I set it to
plain JavaScript, the reference container works without jQuery, and the scrolling is done by hard links with the same scroll offset. Only the duration cannot be increased any longer, the target is reached instantly.@hopper87it, @pkverma99: You are welcome to try it out right now, as it is in v2.5.6d3 currently available at https://downloads.wp.xz.cn/plugin/footnotes.zip
The tooltips are not affected by this option. If you are interested in Footnotes not loading any libraries any more, you may wish to opt also for alternative tooltips.
Best regards.
Thank you @pewgeuges – Much appreciated. As I read this thread a second time, I realized that I may have misunderstood the problem. I am trying to defer / remove jquery-ui and not core jquery. And it looks like the solution is as you mentioned above.
=========
#2 makes sure tooltips display without jQuery UI, using a small internal script for display/hide, and CSS transitions for fade-in/out with the same settings (fade-in delay and duration, fade-out delay and duration). The downside is that these tooltips neither shrink to adapt to a short tooltip text (didn’t find out how to achieve it) nor resize to adapt to the window. Therefore, best is to use a page layout with a sidepane or widget area (or two) to the left or (and) to the right, and to position the tooltips accordingly to the left or to the right of the referrers.
========
which means that I can do it without the fix. My apologies for mis-communication. I would first try with the latest version and if that doesnt work then I would try the fixed version.Regards
Thanks for your feedback. No worries at all. We’d love to learn if it helps to do without jQuery UI but not without jQuery Core?
The fix has now been released as v2.5.6 and is now available as a regular update.
Sorry for the delay. We also added something to shrink alternative tooltips with very little content (not counting HTML markup) so that the difference with jQuery UI tooltips is not so disturbing any longer. I attempted to do this way earlier but failed. Now the shrinking workaround is automatically applied when alternative tooltips are enabled.
Enabling the “plain JavaScript” mode and the alternative (JS+CSS) tooltips makes Footnotes work without jQuery Core and without jQuery UI, and if not by another plugin, the libraries won’t be loaded.
Thanks, also to @pkverma99, for helping make this happen!
works like a charm!
Thank You!Hi @hopper87it,
Thanks for your feedback!
We’re glad it fixes your issue!
Thanks again for triggering the implementation of this solution!
The topic ‘Footnotes + Wp rocket’ is closed to new replies.