Skip to content

more explicit instruction for how to use this with npm + webpack/browserify #62

@tnrich

Description

@tnrich

Hey there,

I'd love it if there were a clear set of steps somewhere in the docs or readme for how to install and use this tool if using webpack/browserify. Here's what I think it needs:

npm i -S tether-tooltip

// in index.js
var Tooltip = require('tether-tooltip')
// or if just using the html data-tooltip attributes:
require('tether-tooltip')

//optionally create tooltips manually
let tooltipInstance = new Tooltip({
  target: document.querySelector('.tooltip-target'),
  content: "My awesome <b>content</b>.",
  classes: 'tooltip-tether-arrows',
  position: 'top left'
})
// or elsewhere in html: (I'm not sure if this will work..)
<a href=# data-tooltip="Weeeeee" data-tooltip-position="top center">I'm a link!</a>

I'm not sure if the above will work or not. Please correct me if I'm doing something wrong.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions