Skip to content

Commit

Permalink
Fix anchors.add() being called too late (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
pamtbaau committed Jun 13, 2021
1 parent 07c87de commit 7e5e85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anchors.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function onTwigSiteVariables()

$this->grav['assets']->addJs('plugin://anchors/js/anchor.min.js');

$anchors_init = "$(document).ready(function() {
$anchors_init = "document.addEventListener('DOMContentLoaded', function(event) {
anchors.options = {
$visible
$placement
Expand Down

0 comments on commit 7e5e85d

Please sign in to comment.