Fix sticky aside when height change

This commit is contained in:
fabrixxm 2017-04-26 08:56:47 +02:00
parent e569e20caf
commit ea9d44c20a
1 changed files with 7 additions and 1 deletions

View File

@ -320,7 +320,13 @@ $(document).ready(function(){
* Sticky aside on page scroll
*/
$("aside").stick_in_parent({
offset_top: 100 // px, header + tab bar + spacing
offset_top: 100, // px, header + tab bar + spacing
recalc_every: 10
});
// recalculate sticky aside on clicks.
// this handle height changes on expanding submenus
$("aside").on("click", function(){
$(document.body).trigger("sticky_kit:recalc");
});
});