zanematthew / zm-ajax-login-register

Creates a simple login and register modal with an optional shortocde

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin Compatibility with Easy-to-use

zanematthew opened this issue · comments

Seems its not compatible with Easy-to-use

commented

Thanks for making an issue for this. It may work for a login or register page but not for the homepage using modal pop up boxes.

The plugin author of Easy to use may not have thought about that scenario.

These two plugins are incompatible due to the way the markup loads. The fix will be for the author of Easy-to-use to update the JavaScript to allow for attaching of events to items that are loaded in the future as well as items that are currently loaded.

/*
Easy-to-use plugin
wordpress.org/plugins/easy-to-use/
*/


jQuery(function($){

    $('input[name="rememberme"]').prop('checked', true); // enable 'remember me' by default

    // unmask all the password inputs only on focus
    $( document ).on( 'focus', 'input[type="password"]', function( event ){
        $(this).prop('type', 'text');

        // mask all the password inputs on blur
        $(this).on('blur', function(){
            $(this).prop('type', 'password');
        })
    });

});