Title: JavaScript Trigger on Login
Last modified: August 22, 2016

---

# JavaScript Trigger on Login

 *  [jamiesinclair](https://wordpress.org/support/users/jamiesinclair/)
 * (@jamiesinclair)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/javascript-trigger-on-login/)
 * Hey—
 * This is a simple question…but I don’t see the answer anywhere!
 * Is there a single JS event that is trigger (on the document or something) when
   login is successful?
 * Also, is any WordPress user info returned? Such as userID or something?
 * I’m thinking, I’d like to be able to do something like this:
    ` $(document).on('
   lwaSuccess',function(obj){ console.log(obj.userID); });
 * [https://wordpress.org/plugins/login-with-ajax/](https://wordpress.org/plugins/login-with-ajax/)

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/javascript-trigger-on-login/#post-5399029)
 * try under login-with-ajax/widget/login-with-ajax.js

Viewing 1 replies (of 1 total)

The topic ‘JavaScript Trigger on Login’ is closed to new replies.

 * ![](https://ps.w.org/login-with-ajax/assets/icon-256x256.png?rev=976165)
 * [Login With Ajax - Fast Logins, 2FA, Redirects](https://wordpress.org/plugins/login-with-ajax/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/login-with-ajax/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/login-with-ajax/)
 * [Active Topics](https://wordpress.org/support/plugin/login-with-ajax/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/login-with-ajax/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/login-with-ajax/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [trigger](https://wordpress.org/support/topic-tag/trigger/)

 * 1 reply
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/javascript-trigger-on-login/#post-5399029)
 * Status: not resolved