npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

input-vademecum

v0.1.0

Published

smart handler for visualise a guide related to a specific input field

Downloads

8

Readme

Input Vademecum

smart handler for visualise a guide related to a specific input field [jQuery plugin]

Description

Imagine you have a form and you want to teach people all details about every single input. Okay, you can also use placeholder attribute or hint texts, but if you need to write a detailed (long) instructions those seem not the right solution.

With Input Vademecum plugin you can attach in every (or some as you choiced) input an useful handler to open the complete guide description about that input (or every other html tags) in an appropriate panel (via AJAX).

Features

  • all input types (and also other tags).
  • open the content via AJAX.
  • minimum setup required

Usage

  1. Download into your javascript and css app directory the minimised files you seen under /lib
  2. Add the meta tag for input-vademecum.css and the script src to input-vademecum.js like this:
  <head>
    <link href="/your-css-directory/input-vademecum.min.jquery.css" rel="stylesheet" />
    <script src="/your-js-directory/jquery.min.js"></script>
    <script src="/your-js-directory/input-vademecum.min.jquery.js"></script>
  </head>
  1. Select form (or another container tag like fieldset or div) which contain the input interested to be explained with the guide like this:
  <script>
    $( document ).ready(function() {
      $('form').vademecum();
    });
  </script>
  1. insert the URI or URL of your guide (that you have already made) with attribute data-vademecum-href for every input (or any other tag) you want to add the guide like this:
  <form action="#">
    <input type="text" name="name" data-vademecum-href="/guide/contact-name.txt">
    <input type="text" name="surname" data-vademecum-href="/guide/contact-surname.txt">
    <textarea type="textarea" name="notes" data-vademecum-href="/guide/generic-notes.txt"></textarea>
  </form>

Examples

coming soon ...

Configuration

You can provide a configuration of some parts, using an object literal inside the parenthesis:

Key | Descrription | Type | Default --- | --- | --- | --- prefix | the scope name used to name the parts generated dynamically by the plugin | string | vademecum data_suffix | the data attribute name used to specify the href in every input | string | vademecum-href handler_text | text displayed in the handler link | string | ? loading_text | text displayed in the panel during loading content | string | loading... close_text | text displayed in the top right corner panel to close itself | string | x

Browser compatibility

coming soon ...

Testing

For testing ajax requests we need to use an http web server, if you don't have one installed in your host you can simply install one running with Node.js:

  1. Install connect and serve-static with NPM
$ npm install connect serve-static
  1. Create server.js file with this content:
var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(8080, function(){
    console.log('Server running on 8080...');
});
  1. Run with Node.js
$ node server.js

License

Copyright (c) 2016 Mirco Frison

Released under the MIT License.