Plugin Author
Son Do
(@sondoha)
Hi,
Your idea is very cool! And I have just tried your code above. It made the whole sidebar scrolling which is cool. But I don’t think it would work when the sidebar is too long?
Yea, I was thinking the same thing. Fortunately, for myself I usually only have “Pages” and “Links” visible in on the nav-menus.php page.
It looks like it has a ton of built in options, but there aren’t any examples on how to use them.
It looks like followScroll
might be the answer which aparently checks if the element is bigger than the browsers window.
It might have another option to tackle this issue and I’m just not seeing it.
Another solution might be to check the height of the #side-sortables
with jquerys “.height” and if it’s greater than the visible browsers height to disable the script.
Maybe something like this:
$("#side-sortables .control-section.accordion-section").on( "click", function(){
if ($("#side-sortables").height() >= $(window).height()) {
$("#side-sortables").hcSticky('off');
}
});
It looks like “reinit” will also turn it back on… I haven’t tested any of this though, My jquery is average at best.
Plugin Author
Son Do
(@sondoha)
Sorry for my late reply. I was too busy on my normal work.
I appreciate your idea. I will improve my plugin following your suggestions in next version.
Cheers,
Son