Created
July 31, 2021 16:55
-
-
Save reachkamrul/2326bf1631a3b3741f7841deebf6dff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var passField = $form.find('input[data-name=password]'); | |
passField.wrap("<div class='ff_input-group'></div>"); | |
passField.after('<div class="ff_input-group-append"><span class="ff_input-group-text"><i style="cursor:pointer;" class="dashicons dashicons-hidden toggle-password"> </i></span></div>'); | |
$form.find(".toggle-password").click(function() { | |
$(this).toggleClass("dashicons-visibility dashicons-hidden"); | |
if (passField.attr("type") == "password") { | |
passField.attr("type", "text"); | |
} else { | |
passField.attr("type", "password"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome, can you check why it displayed 2 eye icons when using the form in a pop-up
you can check out the link here with the pop-up button:
https://slc.expandnet.net/elementor-4600/