Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Created July 31, 2021 16:55
Show Gist options
  • Save reachkamrul/2326bf1631a3b3741f7841deebf6dff0 to your computer and use it in GitHub Desktop.
Save reachkamrul/2326bf1631a3b3741f7841deebf6dff0 to your computer and use it in GitHub Desktop.
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");
}
});
@belalismail
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment