Skip to content
Quick, cool margin notes
JavaScript
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead, 12 commits behind fdansv:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.md
README.md
marginotes.js Add back in span styling - cssText usage was incorrect Mar 10, 2016
package.json

README.md

vanilla-marginotes

Vanilla Marginotes is a vanilla Javscript fork of Marginotes. Marginotes takes your jQuery selection, HTMLCollection, or Array of DOM elements and adds notes to the margin with the text provided in HTML attributes. You can see it working live at a fork of the creator's website

Usage

Marginotes works by adding a desc attribute to an HTML element, which will be displayed as a tooltip:

<a href="https://www.gatesnotes.com/" desc="Original, right?">Bill Gates</a>

marginotes

marginotes(document.querySelectorAll("selector"), options)

It works with links, as well as with <span> elements:

<span desc = "The rainiest place in Europe. Probably. Maybe.">Brión</span>

marginotes

Options

width: sets the tooltip's width. Default is 100px.

field: sets the html attribute to look for. Default is desc

License

Copyright (c) 2016 Francisco Dans

Licensed under the MIT license, see LICENSE.md for more information.

You can’t perform that action at this time.