A jQuery plugin for creating exceptional footnotes.

Overview

bigfoot.js

by Chris Sauve

Bigfoot is a jQuery plugin that creates exceptional footnotes. Simply include the code on your pages and footnotes will be detected automatically and improved in the following ways:

  • Links to footnotes will be replaced with clickable/ tappable buttons, making them substantially easier to hit.

  • Footnote content will appear in a popover directly beside the footnote button when it is clicked/ tapped, which cuts out the annoying bouncing around the page that footnotes typically result in.

  • The active popovers will be resized and repositioned to ensure that they continue to be completely visible on-screen and aesthetically pleasing: this makes it perfect for mobile devices and responsive designs.

This project includes both the script itself and a default style to apply to the footnote button/ content that are eventually generated. There are also a variety of additional styles that illustrate some of the possibilities for styling these components.

The script has many configurable options from having popovers instantiated on hover, to allowing multiple active footnotes, to setting specific timeouts for popover creation/ deletion. It also returns an object that allows you to activate, remove, add breakpoints, and reposition popovers properly. All of these options and return functions are shown in detail at the script's project page. You can also see a demo of the project in action on the same page.

Requires jQuery 1.7+ at a minimum (for .on()) and jQuery 1.8+ for full functionality (1.8 automatically prefixes the transform/ transition properties).

Note: Bigfoot is currently incompatible with jQuery 3.0+ (see #54)

Questions? Issues? Feature requests? Check out the Github page for this project.

Comments
  • Can't compile bigfoot-number.scss

    Can't compile bigfoot-number.scss

    CodeKit 2 is returning the following error:

    Compass was unable to compile one or more files in the project:

    error style.scss (Line 40 of _bigfoot-number.scss: List index is 2 but list is only 1 item long for `nth')
    
    opened by philgruneich 8
  • Popover positioning is broken on Mobile Safari when zoomed-in

    Popover positioning is broken on Mobile Safari when zoomed-in

    Steps to reproduce:

    1. Load any bigfoot.js enabled page (marco.org, blog.jaredsinclair.com, etc.) on an iOS device running Mobile Safari. Try an iPad in particular.
    2. Pinch open to zoom in to an area of text containing a footnote button.
    3. Tap the button.
    4. The popover is off by an unpredictable amount of horizontal pixels.

    This bug does not occur on desktop Safari.

    opened by jaredsinclair 7
  • Demo styles look broken

    Demo styles look broken

    Looking at http://bigfootjs.com in mobile Safari it looks like the popup styles are broken. On the homepage and on the demo page the popup displays as a slim stroke, cutting off the text inside. a screenshot of the issue

    opened by fschroiff 6
  • Added a substitution for single quotes in the footnote content.

    Added a substitution for single quotes in the footnote content.

    Footnote content that contained a single quote character was being truncated at the quote. This replaces the single quote with an ' when the double quote and less than/greater than signs are replaced.

    opened by DavidEBest 5
  • Fix to avoid error when bigfoot.js is compressed/minified

    Fix to avoid error when bigfoot.js is compressed/minified

    Hi @lemonmade here is a fix to avoid error when unminified version of the script is minified with an external tool :

    https://github.com/lemonmade/bigfoot/blob/master/dist/bigfoot.js#L32

    footnoteButtonSearchQuery = settings.scope ? "" + settings.scope + " a[href*=\"#\"]" : "a[href*=\"#\"]";

    should be replaced with :

    footnoteButtonSearchQuery = settings.scope ? '' + settings.scope + ' a[href*="#"]' : 'a[href*="#"]';

    (like it's done in min version of the script)

    opened by brunob 5
  • Scrollable footnotes don't scroll in Safari on Yosemite

    Scrollable footnotes don't scroll in Safari on Yosemite

    Longer footnotes don't always scroll in Safari 8.0 on Yosemite. They're fine on Chrome and Firefox. As soon as I open the Safari Inspector, it scrolls. Refresh the page and the issue is back...

    opened by lexpostma 5
  • add settings allowing use of different markup

    add settings allowing use of different markup

    With these new settings users will be able to use this great script with other html markup.

    The new settings names may not be ideal, feel free to adapt/rename it :)

    Any thoughts about this ?

    opened by brunob 4
  • Unable to see tooltip pointing to the footnote button

    Unable to see tooltip pointing to the footnote button

    When I set up bigfoot.js on my project, the popover shows up correctly (as a rounded rectangle), but I do not see the little "arrow" on the popover.

    Is there a setting that controls this?

    opened by debajit 4
  • Incorrect footnote behavior on Jekyll/Octopress index pages

    Incorrect footnote behavior on Jekyll/Octopress index pages

    This is something between a bug and a feature request. A common element of many Jekyll/Octopress style blogs is an index page that has excerpts from the last X blog posts. Now if there are any footnotes in within those excerpts that Bigfoot starts to run into trouble (for obvious reasons), because the footnote will both be incorrectly labeled and will be display the incorrect text.

    That is, if we have the following excerpt

    Lorem ipsum dolor sit amet, in nulla causae aliquam usu, assum augue sit ex. Veritus electram ut vim, nobis oratio inimicus nec an, docendi repudiandae et nec. Ut eos convenire rationibus, eu eam elit commune intellegat. Tritani mediocritatem no eam. Te legere nusquam nam.[^1]

    [^1]: Vel tale democritum ex

    And then the following:

    Sint hinc mel ad, mei et tritani necessitatibus, vel magna dolorum patrioque te. In eos fabulas fuisset suavitate. Dolorem complectitur te eos, mel error possit minimum no. Cu justo saperet mea, vim virtute percipit cu. Nisl enim salutandi ei nam, ne qui facer lobortis scripserit, ius ad erat labitur convenire.[^1]

    [^1]: Mutat aliquam contentiones mel

    The second footnote will be labeled as 2 instead of 1 and will display Vel tale democritum ex instead of Mutat aliquam contentiones mel

    I am unaware of the inner workings of Bigfoot.js, but would it be possible to scan until you hit a footnote section instead of scanning through the whole page? Thank you for the wonderful project. My blog and I are very grateful

    opened by tlnagy 4
  • website unavailable

    website unavailable

    the README's project page and demo links redirect to http://www.bigfootjs.com, but that address is currently unavailable

    aside: it'd be nice if this repo's header included a link to that site

    opened by FND 4
  • Can't scroll popover until window is resized in Safari on El Capitan

    Can't scroll popover until window is resized in Safari on El Capitan

    Popovers with overflow content will not scroll until the window is resized in Safari (only on El Capitan – it works fine in Chrome on El Capitan, and in Safari on Yosemite).

    It's reproducible on the demo page (use the footnote button under "Usage" for example). Just open the page, then click the footnote to open the popover. 2-finger scrolling the popover should fail. Resize the window with the popover still visible, and 2 finger scrolling the popover should now work.

    Note that closing and reopening the popover requires the window again be resized for scrolling to work.

    Example movie showing the problem here: http://cl.ly/dRBS

    opened by zcohan 3
  • Using 'footnote' or 'footnotes' as a tag

    Using 'footnote' or 'footnotes' as a tag

    Hi, I understand that Bigfoot is not being maintained, but I've been using it on a few Squarespace sites for a number of years now and discovered a frustrating and interesting bug/error.

    Someone contacted me to ask how I implemented Bigfoot.js on my site and I decided to write up a walkthrough. I previewed it many times, but once I finally published the post, Bigfoot stopped working. I checked that it was still working fine on other pages and posts and spent some time trying to fix the issue by creating a new post, checking, and again discovering it wasn't working. It turns out that I was adding tags as the final step before making the post public. I narrowed it down to using 'footnote' or 'footnotes' as tags. (It was a post about adding footnotes, after all.) By removing these tags, Bigfoot again worked as expected.

    I'm more curious than anything whether this is a known issue (or perhaps a feature?) and/or why it may be happening (I'm still quite new to JavaScript).

    opened by nathancashion 0
  • [Accessibility] Broken keyboard navigation on demo page

    [Accessibility] Broken keyboard navigation on demo page

    Navigating by tab on the demo page, I get directed to:

    1. The first "..." (good)
    2. download (good)
    3. github (good)
    4. demo (good)
    5. <a href="#project">, an element invisible on the screen (bad)

    More info on why this is important:

    1. https://accessibility.digital.gov/ux/tab-order/
    2. https://www.w3.org/TR/UNDERSTANDING-WCAG20/content-structure-separation-sequence.html

    This, along with #73 , makes it hard to evaluate whether the plugin is accessible.

    opened by GaloisGirl 1
  • [Accessibility] Focused element on demo page is barely visible

    [Accessibility] Focused element on demo page is barely visible

    More info on why this is important:

    1. https://a11yproject.com/posts/never-remove-css-outlines/
    2. https://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F78
    opened by GaloisGirl 0
  • scroll issue - windows 10, chrome

    scroll issue - windows 10, chrome

    From a reader on our site:

    "When I scroll inside them, I get a few lines after what's initially visible, and then it jumps straight to the bottom, so I'm missing content in the middle. For reference, working on Windows 10 on a PC, with the site open in Chrome. All notes seem to be behaving the same way."

    opened by andreanam 1
  • Question on implementing buttonMarkup

    Question on implementing buttonMarkup

    Thanks for this awesome plugin. I just had a question about the documentation for buttonMarkup.

    I've been trying to get the numeric style like how it's rendered in the demo, so I was trying to set the buttonMarkup settings, but I can't understand how the value of {{SUP:attr}} is acquired and how I should define this in options.

    If this is my footnote: <sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>

    What value should I use for buttonMarkup below?

    var bigfoot = $.bigfoot( { deleteOnUnhover: true, preventPageScroll: false, hoverDelay: 250, activateOnHover: true, buttonMarkup: ? } );

    Thanks! The PayPal donation link also wasn't working btw. I owe you a coffee. :)

    opened by ajacinto 0
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A JavaScript plugin for creating a tickerboard effect. Plugin for React or vanilla JS.

ticker-board A JavaScript plugin for creating a tickerboard effect. See the Ticker Board page for more info. Importing it There are basically two ways

Robin James Kerrison 6 Aug 11, 2022
jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands

JavaScript Library for Web Based Terminal Emulators Summary jQuery Terminal Emulator is a plugin for creating command line interpreters in your applic

Jakub T. Jankiewicz 2.8k Jan 1, 2023
JQuery charCounter - jQuery Character Counter Plugin

jQuery Character Counter A jQuery based character counter for <input> and <textarea> HTML tags. What is this? This simple plugin allows you to add a c

mmmm_lemon 1 Aug 10, 2022
jQuery quick notification plugin. jQuery плагин быстрых уведомлений

Note: English translation by Google Translate Notific About Description: this is a jQuery plugin that helps you display notifications on your site. Li

Webarion 2 Nov 7, 2021
An Obsidian plugin for automatically creating notes when linking to non-existing notes

Note Auto Creator for Obsidian Automatically create notes when links are created to them. How to use After enabling the plugin in the settings menu, y

Simon Clement 31 Dec 14, 2022
The (extremely) lightweight alternative to the mmenu.js plugin for creating off-canvas mobile menus.

mmenu light The (extremely) lightweight alternative to the mmenu.js plugin for creating off-canvas mobile menus with the exact look and feel. Examples

Fred Heusschen 172 Dec 12, 2022
Obsidian plugin to open a note of your choice when creating a new tab, like in the browser.

New Tab Default Page Obsidian plugin to open a note of your choice when creating a new tab, like in the browser. Usage Set the note to open in new tab

pseudometa 20 Dec 27, 2022
A plugin for creating hierarchical navigation in Astro projects. Supports breadcrumbs too!

astro-navigation A plugin for creating hierarchical navigation in Astro projects. Supports breadcrumbs too! Full docs coming soon! Basic usage This pa

Tony Sullivan 7 Dec 19, 2022
A variety of jQuery plugin patterns for jump starting your plugin development

jQuery Plugin Patterns So, you've tried out jQuery Boilerplate or written a few of your own plugins before. They work to a degree and are readable, bu

jQuery Boilerplate 1.6k Dec 31, 2022
This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way, this plugin works after page load.

Jquery-SingleImagePopup This is a simple Image popup Jquery plugin. With a very simple configuration, you can show a popup on your webpage. By the way

Rajan Karmaker 1 Aug 22, 2022
Jquery-actualizer - jQuery ajax actualizer

jQuery AJAX Actualizer Include jQuery & this plugin into your HTML file and use this js code: $('#target').actualizer('a'); On click at any A element,

Šimon (Simon) Rataj 1 Jul 28, 2020
jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

jquery-input-mask-phone-number A jQuery Plugin to make masks on input field to US phone format. Quick start 1. Add latest jQuery and jquery-input-mask

Raja Rama Mohan Thavalam 12 Aug 25, 2022
A Web UI toolkit for creating rapid prototypes, experiments and proof of concept projects.

MinimalComps2 A Web UI tookkit for creating rapid prototypes, experiments and proof of concept projects. The site: https://www.minimalcomps2.com/ Full

Keith Peters 32 Apr 18, 2022
This is my first attempt in creating a mern stack ecommerce website. Hope you like it!!

MERN E-COMMERCE PROJECT Hi! My name is Suhrrid Banerjee, This is my first attempt in creating a MERN stack e-commerce website. Prerequisite Nil Env Va

Suhrrid Banerjee 1 Jan 8, 2022
Youtube Tutorial Project for creating a developer portfolio website.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev

codingwithdidem 14 Nov 29, 2022
🤖 Script to automate creating built branches

build-this-branch Script to automate creating built branches. Support this project by ⭐️ starring and sharing it. Follow me to see what other cool pro

hiroki osame 22 Aug 6, 2022
Fallback for SVG images by automatically creating PNG versions on-the-fly

SVGMagic - Cross browser SVG This repository is no longer actively mainted. It has proven to be very usefull back in 2013, but these days SVGs are sup

Dirk Groenen 596 Jul 27, 2022