Plugin Author
LuckyWP
(@theluckywp)
Hello!
JS use only for toggle Show/Hide and smooth scroll.
If you don’t use this features you can disable JS:
add_filter('lwptoc_enqueue_script', '__return_false');
Thread Starter
Rookie
(@alriksson)
Okay, thanks! No I do not use.
Okay, but what do you use for off-set when using sticky/fixed header?
@theluckywp Please check this ticket as I can not use the plugin now anyhow: https://wordpress.org/support/topic/follow-up-on-oxygen-support/
Thread Starter
Rookie
(@alriksson)
Ok so if I disable the js I will also remove the function for off-set? is there not a css solution for this? Smooth scrolling has css solution no js needed.
Plugin Author
LuckyWP
(@theluckywp)
Now for offset need JS. Maybe in future we make possibility use this without JS.
Thread Starter
Rookie
(@alriksson)
Okay, would prefer no-js as it hit the performance on mobile network and devices. JS requires much more computing power than CSS.
Also off-set is not always correct how can I alter this?
Plugin Author
LuckyWP
(@theluckywp)
Thread Starter
Rookie
(@alriksson)
Cheers, if I disable Toggle Show/Hide does it remove this code from the js file? Seems like it doesn’t. Maybe load separated js files one with all options enabled. Once offset or toggle is disabled, unload and load a more targeted and optimized file for what the users use.
The same goes for css file with UL, OL DIV and Toggle. Do not print everything in the same file. Print based on options.
-
This reply was modified 4 years, 1 month ago by Rookie.
Plugin Author
LuckyWP
(@theluckywp)
If you don’t use this features you can disable JS:
add_filter('lwptoc_enqueue_script', '__return_false');
-
This reply was modified 4 years, 1 month ago by LuckyWP.
Thread Starter
Rookie
(@alriksson)
I need to use off-set that’s the issue. The rest I would like to be removed 😀
Plugin Author
LuckyWP
(@theluckywp)
You will save very, very small bytes.
Thread Starter
Rookie
(@alriksson)
hmm, js is heavy so still, 0.5kb js is not equivalent to 0.5kb css.
Thread Starter
Rookie
(@alriksson)
Yes but 0.5kb js is much heavier to render than 0.5kb css. But you don’t have to listen to my feedback.