From 64402ae947df8ca23271b8495586491793559afe Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Thu, 1 Dec 2022 10:55:30 +0300 Subject: docs: document data-class usage --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbc10d6..806ac4a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is a fork of the [original project](https://github.com/capjamesg/hovercard. ## Getting Started -The `hovercard.js` script searches for all `` tags enclosed within an `
` tag on a web page. Mouse hover and focus listeners are added to each link. When the mouse hovers over a link, `hovercard.js` looks for the `href` value of the link in a JSON object called `hovercards`. If the link is found in the JSON object, a hovercard is added directly below the link on the page. +The `hovercard.js` script searches for all `` tags enclosed within the tags marked with a specified class on a web page. Mouse hover and focus listeners are added to each link. When the mouse hovers over a link, `hovercard.js` looks for the `href` value of the link in a JSON object called `hovercards`. If the link is found in the JSON object, a hovercard is added directly below the link on the page. When a user hovers off the link or moves focus onto another element (i.e. by using the keyboard to navigate links on the page), the hovercard will disappear. @@ -18,9 +18,9 @@ When a user hovers off the link or moves focus onto another element (i.e. by usi To use the hovercard script, first download a copy and upload it to your site. Then, add this code above the closing `` tag on your web page: - + -Substitute the path of the script in the example above with the location of the script on your site. +Substitute the path of the script in the example above with the location of the script on your site, and `"use-hovercards"` with any class name to your liking. If the `data-class` part is omitted, the script will look in the `"content"` class by default. ## Roadmap -- cgit v1.2.3