
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Super tiny jquery plugin for modal windows. JS size 1163 bytes minified, 643 bytes gziped.
Simple default way:
<a href="#" id="some-link">Open popup</a>
<div id="popup" style="display:none">
Window contents
</div>
$(function() {
$('#some-link').click(function() {
$('#popup').m1k();
return false;
});
});
Or you can bind to any links with data attribute:
$('[data=target').click(function() {
$($(this).data('target')).m1k();
return false;
});
so you can do this:
<a href="#" data-target="#popup">Open popup</a>
Or you can load any content:
$('<h1>Hello</h1>').m1k();
It's usefull for ajax:
$.get('/some/url', function(result) {
$(result).m1k();
})
List of options with default values:
{
id : 'm1k', // It's a namespace. Append to every css class name
single: false, // Close other modal windows when open new window
esc: true, // Close window on esc
click: true, // Close window on click in back
close: 'x' // Close button contents. Can be null|undefined
}
There 3 ways to pass options:
$.m1k.default
m1k({options})
<div class='popup' data-esc='false'>
$.m1k.close()
— close current window
FAQs
Super tiny jquery plugin for modal windows. Less then 1k bytes.
The npm package jquery-m1k receives a total of 0 weekly downloads. As such, jquery-m1k popularity was classified as not popular.
We found that jquery-m1k 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.