Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@fengyuanchen/tooltip
Advanced tools
Readme
A simple jQuery tooltip plugin.
dist/
├── tooltip.css (2 KB)
├── tooltip.min.css (2 KB)
├── tooltip.js (9 KB)
└── tooltip.min.js (4 KB)
Three quick start options are available:
git clone https://github.com/fengyuanchen/tooltip.git
.npm install @fengyuanchen/tooltip
.Include files:
<script src="/path/to/jquery.js"></script><!-- jQuery is required -->
<link href="/path/to/tooltip.css" rel="stylesheet">
<script src="/path/to/tooltip.js"></script>
Initialize with $.fn.tooltip
method.
// With option
$('body').tooltip({
autoshow: true,
content: 'Hello, world!'
});
// With method
$('body').tooltip('show', 'Hello, world!');
// Shortcut
$('body').tooltip('Hello, world!');
// Set tooltip options
$().tooltip(options);
// Change the global default options
$.fn.tooltip.setDefaults(options);
Boolean
true
Hide the tooltip automatically when timeout. requires duration
option to be set.
Boolean
true
Show the tooltip automatically when initialize. requires content
option to be set.
String
''
Tooltip content
Boolean
false
Show countdown view. requires duration
option to be set.
Boolean
false
Allow to dismiss the tooltip by click an attached close button before it is closed automatically.
Number
3000
Define the time of the tooltip showing (3 seconds by default).
Boolean
true
Fix the tooltip (Only available for body
element).
Number
10
Offset of the tooltip from its parent.
String
'center top'
'left top'
, 'center top'
, 'right top'
,
'left middle'
, 'center middle'
, 'right middle'
,
'left bottom'
, 'center bottom'
, 'right bottom'
Position of the tooltip (horizontal and vertical)
String
'default'
'default'
, 'primary'
, 'success'
, 'info'
, 'warning'
, 'danger'
Style of the tooltip
Number
1024
Z-index of the tooltip.
$().tooltip('method', argument1, , argument2, ..., argumentN)
String
Show the tooltip with new content.
$().tooltip('show', 'Hello, world!');
$().tooltip('show', 'Hello, world!', 'primary');
$().tooltip('show', 'Hello, world!', {
style: 'primary',
zIndex: 2048
});
Shortcut: $().tooltip(content, options)
show
method$().tooltip('Hello, world!', 'primary');
Hide the tooltip.
Destroy the tooltip.
This event fires immediately when the show
instance method is called.
This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).
This event is fired immediately when the hide instance method has been called.
This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).
If you have to use other plugin with the same namespace, just call the $.fn.tooltip.noConflict
method to revert to it.
<script src="other-plugin.js"></script>
<script src="tooltip.js"></script>
<script>
$.fn.tooltip.noConflict();
// Code that uses other plugin's "$().tooltip" can follow here.
</script>
As a jQuery plugin, you also need to see the jQuery Browser Support.
Released under the MIT license.
FAQs
A simple jQuery tooltip plugin.
The npm package @fengyuanchen/tooltip receives a total of 2,435 weekly downloads. As such, @fengyuanchen/tooltip popularity was classified as popular.
We found that @fengyuanchen/tooltip 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.