Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
tooltipster-discovery
Advanced tools
A Tooltipster plugin to help browsing through a series of tooltips.
Discovery is a Tooltipster plugin to help browsing through a series of tooltips. MIT license.
The idea is that if you hover over an element which makes a tooltip appear, and then move to an adjacent element also with a tooltip, there should be no "closing" and "opening" animations. The first tooltip closes and the second one opens immediately. This is useful when you have a row of adjacent elements, and a user wants to "browse" the tooltips of each one.
The behavior offered by this plugin is exactly the one demonstrated on Tooltipster's documentation page in the Grouped tooltips section.
Include the plugin file in your page AFTER the Tooltipster file.
<html>
<head>
...
<script type="text/javascript" src="tooltipster/dist/js/tooltipster.bundle.min.js"></script>
<script type="text/javascript" src="tooltipster-discovery/tooltipster-discovery.min.js"></script>
</head>
</html>
Add a common class name to the tooltips you wish to group, for example 'grouped'
:
<html>
<body>
<span class="tooltip" title="vegetable">Carrot</span>
<span class="tooltip grouped" title="Fruit">Cherries</span>
<span class="tooltip grouped" title="Fruit">Oranges</span>
<span class="tooltip grouped" title="Fruit">Apples</span>
</body>
</html>
Initialize your tooltips as usual:
$('.tooltip').tooltipster({...});
This plugin only works for the tooltips which use the
'hover'
trigger (specifically themouseenter
ortouchstart
open triggers).
Discovery will have created a group
core method. Use it to create a group based on the 'grouped'
class name:
$.tooltipster.group('grouped');
And that's it, it should work.
To restore the normal behavior of the tooltips, just call the ungroup
method:
$.tooltipster.ungroup('grouped');
You do not have to declare the Discovery plugin in the options of the tooltips, because it works at Tooltipster's core level only, not at the instance level.
Thanks to @matthew-dean for the idea of this plugin!
FAQs
A Tooltipster plugin to help browsing through a series of tooltips.
The npm package tooltipster-discovery receives a total of 15 weekly downloads. As such, tooltipster-discovery popularity was classified as not popular.
We found that tooltipster-discovery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.