Loading


Advertisement:

Author Topic: [SOLVED] Show / hide password using Javascript  (Read 803 times)

calinbehtuk

  • Sr. Member
  • ****
  • Posts: 302
Re: [SOLVED] Show / hide password using Javascript
« Reply #30 on: September 14, 2017, 02:35:00 pm »
what is your site address, or what theme you use?

goodisme

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Show / hide password using Javascript
« Reply #31 on: September 14, 2017, 02:52:38 pm »
www.xxxxxx.com
 
select login on footer and compare with header dropdown
« Last Edit: September 14, 2017, 06:16:04 pm by goodisme »

calinbehtuk

  • Sr. Member
  • ****
  • Posts: 302
Re: [SOLVED] Show / hide password using Javascript
« Reply #32 on: September 14, 2017, 04:59:50 pm »
I don't know if it the best solution but you can try like this.
Code: [Select]
                <script type="text/javascript">
                    $(document).ready(function () {
                        $('.form-signin #password').addClass('password_content');
                        $(document).on("mousedown", "#show", function () {
                            var x = document.getElementsByClassName("password_content");
                            x[0].type = "text";
                            var obj = document.getElementById('password');
                            obj.type = "text";
                        });
                        $(document).on("mouseup", "#show", function () {
                            var x = document.getElementsByClassName("password_content");
                            x[0].type = "password";
                            var obj = document.getElementById('password');
                            obj.type = "password";
                        });
                    });
                </script>

goodisme

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Show / hide password using Javascript
« Reply #33 on: September 14, 2017, 06:09:34 pm »
It worked!! Thanks  :)

goodisme

  • Newbie
  • *
  • Posts: 22
Re: [SOLVED] Show / hide password using Javascript
« Reply #34 on: September 28, 2017, 02:16:06 am »
Hi guys, does any one have a code to use an icon toggle instead of a checkbox?

_carlison

  • Full Member
  • ***
  • Posts: 134
Re: [SOLVED] Show / hide password using Javascript
« Reply #35 on: October 03, 2017, 11:05:30 am »
Hi guys, does any one have a code to use an icon toggle instead of a checkbox?

Code: [Select]
Use below code : <i class="fa fa-eye-slash" aria-hidden="true"></i> for http://prntscr.com/gslz4i

Code: [Select]
<i class="fa fa-eye" aria-hidden="true"></i> for http://prntscr.com/gslzc1