
Security News
Python Tools Are Quickly Adopting the New pylock.toml Standard
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
jquery-pluginconfig
Advanced tools
A jQuery plugin that help use data attributes for configuration
You can install with npm
$ npm install jquery-pluginconfig
With Bower
bower install jquery-pluginconfig
Or use some of the files at dist
folder.
Let's say you have a jQuery plugin called my-awesome-plugin
. And you want to allow the user to set the configs of that plugin for a given element using data-*
attributes.
You can let them do this:
<div class="my-element" data-my-awesome-plugin-config="hello" data-my-awesome-plugin-config-two="world"></div>div>
And then you can do this:
var config = $('.my-element').pluginConfig('my-awesome-plugin');
// You'll get { config: "hello", configTwo: "world"}
// Then use it
$('.my-element').myAwesomePlugin(config);
You can also use it internally of your plugin, so the user won't have to call pluginConfig
every time.
That's all, folks!
FAQs
A jQuery plugin that help use data attributes for configuration
The npm package jquery-pluginconfig receives a total of 2 weekly downloads. As such, jquery-pluginconfig popularity was classified as not popular.
We found that jquery-pluginconfig 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
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.
Security News
vlt adds real-time security selectors powered by Socket, enabling developers to query and analyze package risks directly in their dependency graph.