alpinejs / alpine

A rugged, minimal framework for composing JavaScript behavior in your markup.
https://alpinejs.dev
MIT License
28.43k stars 1.23k forks source link

Added missing classes to anchor docs and fixed anchor position caching #4371

Open PluTiper opened 2 months ago

PluTiper commented 2 months ago

Noticed that the last example in the anchor plugin docs doesn't have the same style as the previous ones.

PluTiper commented 2 months ago

I was experimenting with the plugin and also noticed that there might be an issue with the previous position caching. The variable gets re-declared each time the compute function is executed which unnecessarily updates the alpine variables.