hidenger

1.0.4 • Public • Published

Hidenger

Show and hide input with one click
Easy code Vanilla & Pure Javascript

How To Install

npm i hidenger
OR
npm install hidenger

Things to pay attention

  • Input only works with ID attribute
  • The button must have a "data-relevant-input" attribute and this value must match the input's ID

Example HTML Structure And JavaScript Trigger

    <div>
        <input type="password" id="user-password">
        <button type="button" id="user-password-manipulation" data-relevant-input="user-password">Show Password</button>
    </div>
    <div>
        <input type="password" id="user-password2">
        <button type="button" class="user-password-manipulation2" data-relevant-input="user-password2">Show Password</button>
    </div>
    Hidenger.trigger('#user-password-manipulation');
    Hidenger.trigger('.user-password-manipulation2');

Thanks For Help

@selimdoyranli

Package Sidebar

Install

npm i hidenger

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

5.76 kB

Total Files

7

Last publish

Collaborators

  • mcanspinn