lemonmade / bigfoot

A jQuery plugin for creating exceptional footnotes.
http://www.bigfootjs.com
MIT License
936 stars 69 forks source link

How to use numbering style without automatically incrementing the numbers #51

Closed cesar-mso closed 8 years ago

cesar-mso commented 8 years ago

Hi!

I'm trying to use the above styling with this library, but the number within the button (looks like a grey bubble) is automatically incremented depending on how many times you use the functionality. The strange thing is that the content it's linked to works fine, it's just the number that's wrong.

I've sat up the HTML to include footnotes 6 different places, but I only have 3 footnotes:

Lorem ipsum dolor sit amet(1), consectetur adipiscing elit, sed do eiusmod(2) tempor incididunt ut labore et dolore magna aliqua(3). Ut enim ad minim veniam, quis nostrud exercitation(3) ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis(2) aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident(1), sunt in culpa qui officia deserunt mollit anim id est laborum.

However when I'm viewing the page, the footnotes are displayed:

Lorem ipsum dolor sit amet(1), consectetur adipiscing elit, sed do eiusmod(2) tempor incididunt ut labore et dolore magna aliqua(3). Ut enim ad minim veniam, quis nostrud exercitation(4) ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis(5) aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident(6), sunt in culpa qui officia deserunt mollit anim id est laborum.

Is there any way to get this library to work this way? Or do I have to create a script that will overwrite the nr that's used in "data-footnote-number"? The id of the buttons include the proper nr as far as I can see, and was planning on stripping down the id to only include the nr and use that as the "data-footnote-number" value.

Thank you in advance for any help, tips, support or observations! :)

lemonmade commented 8 years ago

Unfortunately, the script assumes that every footnote link points to a new footnote, so it can't do this as it's currently written. This is definitely a mistake on my part, but I unfortunately don't have a lot of time to fix it up. You should be able to do it as you've specified, though.

cesar-mso commented 8 years ago

Hi and thank you for the reply! No worries about the issue, at least now I know. The solution I outlined worked great as well. Thank you for the great functionality nevertheless!! :)