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.
modal-toggler
Advanced tools
Readme
====== Tine dependency for handle simple modals logic
Use npm or yarn package manager to install
npm install modal-toggler
import modalToggler from "modal-toggler";
var MT = new modalToggler(
{
//specify class to show modals
modalClass: "visible",
//specify class for toggling
toggleClass: "toggle-h1",
//find node if you need dark background for your modals (not toggle modals)
backgroundNode: ".bg-wall",
//specify class for dark background
backgroundClass: "visible"
},
function() {
console.log("new MT added");
}
);
<style>
body {
text-align: center;
}
.modal {
position: fixed;
width: 200px;
height: 100px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
display: none;
z-index: 10;
}
.modal.visible {
display: block;
}
.bg-wall {
position: fixed;
background: rgba(0, 0, 0, .4);
display: none;
z-index: 9;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.bg-wall.visible {
display: block;
}
.toggle-h1 {
color: red;
}
</style>
<body>
<h1>Modal-toggler simple example</h1>
<div class="box">
<button data-modal-open="#modal-1">Open modal</button>
<button data-modal-toggle="h1">Toggle color of h1</button>
</div>
<div class="modal">
Some modal text
<button data-modal-close="#modal-1">Close modal</button>
</div>
<div class="bg-wall"></div>
</body>
<!-- just add this attributes on HTML elements -->
data-modal-open="${node id or class with # or dot. in front}"
data-modal-close="${node id or class with # or dot. in front}"
data-modal-toggle="${node id or class with # or dot. in front}"
FAQs
A small module to handle open/close/toggle modal windows and blocks with attributes
The npm package modal-toggler receives a total of 0 weekly downloads. As such, modal-toggler popularity was classified as not popular.
We found that modal-toggler 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.