Skip to content

mcanjs/hidenger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Show hide manipulation input area

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published