Safari and links to elements inside overflow:auto elements

This is a javascript solution for a bug/missing feature in Safari. This script will scan your document for links to named anchors/IDs, and automatically convert them so they will work in Safari when linking to named anchors/IDs inside elements that are set to overflow:auto or to overflow: scroll, etc. etc.

1 content goes in here, many lines

2 content goes in here, many lines

3 content goes in here, many lines

4 content goes in here, many lines

5 content goes in here, many lines

6 content goes in here, many lines

7 content goes in here, many lines

8 content goes in here, many lines

9 content goes in here, many lines

10 content goes in here, many lines

11 content goes in here, many lines

12 content goes in here, many lines

13 content goes in here, many lines

14 content goes in here, many lines

15 content goes in here, many lines

View script source

Back to blog post on deconcept.com.